Delight

Sergey Gromov snake.scaly at gmail.com
Thu Sep 25 14:42:08 PDT 2008


In article <mailman.251.1222378060.19733.digitalmars-d-
announce at puremagic.com>, e-t172 at akegroup.org says...
> Sergey Gromov a ecrit :
> > If you use strictly tabs, you must never, ever, align things in columns 
> > except by the means of indentation, and therefore you can have only one 
> > aligned column.
> 
> Tabs are not meant to align things. Spaces are used for that. You indent
> with tabs, and align with spaces. For example (___> means tab, . means 
> space):
> 
> no indentation
> ___>indentation
> ___>|.column 1.|.column 2.|.column.3.|
> ___>|.field.1..|.field.2..|.field.3..|
> ___>|.field.4..|.field.5..|.field.6..|
> 
> If you only align with space, there will not be any problem regarding 
> different "tabwidths", ever.

You use a mixture of tabs and spaces.  Now you must carefully attend to 
what you are typing and which key you use to make a certain part of 
white space.  Especially if you're re-aligning things.  This approach is 
error-prone, and once in a while you *will* put a space or a tab 
somewhere it doesn't belong, annoying your colleagues and introducing 
indentation errors in your Python code.

Of course you can have whitespace always visible, or use a very smart 
editor.  But even the smartest editor will fail sometimes.


More information about the Digitalmars-d-announce mailing list