in reply to Tabs vs Spaces lets give this a go

A consequence of your first two points:
  1. Tabs belong in one place in a document; and that place only. That place is in between the left-margin and the first word character. This is the tab-zone.
  2. Nothing other than tabs, belong in this tab-zone
is that you can't do any vertically-aligned code. For example, if you want to split a long while- or if-condition onto multiple lines, you can't align things for readability in such a way which is tab-width agnostic.

So, I would disagree with your point 3. Not every line of code has an explicit indentation level, in particular continuation lines do not.

I prefer space indentation for these reasons.

A counter argument could be made that such long lines are always bad, or that one should use a sufficiently wide line and so that line-splitting is never necessary. But you'd need to establish that point before having a tab-v-space argument, since the 'pro tab' position depends on it, I think.

Replies are listed 'Best First'.
Re^2: Tabs vs Spaces lets give this a go
by xdg (Monsignor) on Oct 08, 2006 at 17:00 UTC

    Generally, what he means is to "tab" until you get to the indentation level for an ordinary line at that point, then use spaces after that for justifying continuation lines. E.g.:

    # "--->" is a tab and "." is a space: --->{ --->--->if ( really_long_condition_here() && --->--->.....another_really_long_condition_here() ) # see spaces on t +his line --->--->{ --->--->---># do stuff here --->--->} --->}

    That way, you can adjust the tab display size, but the alignment is preserved.

    I personally can't stand it, but that's the approach the tab-advocates suggest.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

    A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.