logoalt Hacker News

lucketonelast Tuesday at 9:28 PM2 repliesview on HN

> you don't need to fight over it, because it's a local display preference

This has limits.

Files produced with tab=2 and others with tab=8, might have quite different result regarding nesting.

(pain is still on the menu)


Replies

fc417fc802yesterday at 5:21 AM

I don't see why? Your window width will presumably be tailored to accommodate common scenarios in your preferred tab width.

More than that, in the general case for common C like languages things should almost never be nested more than a few levels deep. That's usually a sign of poorly designed and difficult to maintain code.

Lisps are a notable exception here, but due to limitations (arguably poor design) with how the most common editors handle lines that contain a mix of tabs and spaces you're pretty much forced to use only spaces when writing in that family of languages. If anything that language family serves as case in point - code written with an indentation width that isn't to one's preference becomes much more tedious to adapt due to alternating levels of alignment and indentation all being encoded as spaces (ie loss of information which automated tools could otherwise use).

show 1 reply
philsnowyesterday at 1:07 AM

Do you mean that files produced with "wide" tabs might have hard newlines embedded more readily in longer lines? Or that maybe people writing with "narrow" tabs might be comfortable writing 6-deep if/else trees that wrap when somebody with their tabs set to wider opens the same file?