"Don" <nos...@nospam.com> wrote in message 
news:j4j5o6$m4b$1...@digitalmars.com...
> On 09.09.2011 17:49, Andrei Alexandrescu wrote:
>> http://www.reddit.com/r/programming/comments/k7pwu/eclipse_default_line_length_of_80_chars_outdated/
>>
>>
>> Andrei
>
> Interesting to me was the quote from Linus, saying that indentation depth 
> should never exceed 3. If you accept that, then 80 characters seems 
> perfectly reasonable.
>

With Linus being the head Linux guy, I assume he insists on using 8-char 
tabs. If so, it's no fucking wonder he's unable to handle any more than a 
minimal number of indents.

On a related note, that "Linux kernel coding style:" someone quoted in there 
is one of the biggest loads of bullshit I've ever seen.

Most of the whole debate strikes me as somewhat missing the point, anyway. 
Whether or not 80-cols is sufficient involves a lot of non-constant factors: 
What language you're using, how large your indents are, whether 80 is a hard 
limit or merely a guideline, etc. Same goes for the issue of maximum number 
of indents. Most of the debate completely misses this and mistakenly assumes 
there's such a thing as a universally appropriate line width or indent 
depth.

For example, if you're doing asm for x86/6502/Z80, I bet you could probably 
get by fine on 40 columns (well, comments might push it over, though). But 
if you've got 8-char tabs and you're doing either Python or Java, then 
you're probably fucked without a widescreen and about a thousand columns. 
C/C++/D are somewhere in between and would probably depend on coding style.

> Pretty clearly, the language design has a big influence on the maximum 
> indent level of a typical program. I would say that unless the language 
> has considered a low level of indenting to be desirable, 80 characters 
> isn't enough. For example, in D, a member function of a class inside a 
> template wrapped in a version statement already uses three levels of 
> indentation.
>
> IMHO, the comparisons with newspaper columns are flawed, because 
> newspapers don't use indentation in the same way that code does.
> It seems to be a trade-off: more indentation improves readability, but it 
> also increases line length, which reduces readability...

Yea, those out-of-context comparisons bug me too.


Reply via email to