Hi David,
Le 16 mai 06 à 17:03, David Chisnall a écrit :
I like the style guides overall, but I would like to propose one
change. Rather than specifying spaces for indenting, I would like
to see a single tab used for semantic indenting (i.e. inside each
block), and spaces used after that for alignment.
I have nothing against tab, I'm even neutral on the tab vs spaces
debate. The main points behind the choice of spaces for indenting are :
- viewcvs and similar web tools doesn't handle tab very well (always
interpreting them like 8 or more characters, compromising nested
statements visibility)
- spaces indenting is used by GNUstep and most open source projects
This allows you to do things like this (note that this will only
work in a fixed with font):
[object doSomethingWith:this // This is the first argument
andAlso:anotherThing] // This is the second
And have the colons and comments line up whatever the user sets
their tab width to. If we use spaces, then the only way a user can
change the indent width is to replace a sequence of 4 spaces with n
spaces (or a tab), which will destroy this kind of alignment.
When using spaces, I think you usually don't change the indent or you
just reindent the whole source code.
If we just use tabs, then the same applies (it's slightly easier to
change the indent width, but we still lose alignment). By using
this combination, we give developers flexibility as to how they
view the indenting, but still retain a clear and readable body of
code.
This idea of using tabs only for block based alignment and spaces to
keep proper aligments in other cases looks quite appealing to me.
I would also like to see a rationale section added to each part of
the guidelines. That way people can see that we have picked them
for a sensible reason, rather than just made arbitrary choices.
Would be nice, but I'm afraid the whole document just turns into in a
novel. Nicolas suggests we could use links to have further
explanations elsewhere, that could be the right trick.
Thanks,
Quentin.
--
Quentin Mathé
[EMAIL PROTECTED]
_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev