The D Style and tab sizes

Derek Parnell derek at nomail.afraid.org
Sun Sep 10 17:49:01 PDT 2006


On Sun, 10 Sep 2006 17:03:39 -0700, Walter Bright wrote:

> Stewart Gordon wrote:
>> Walter Bright wrote:
>> <snip>
>>>> AFAIC, people who use tabs but indent by half a tab at a time are 
>>>> painting themselves into a corner.  We should aim to write code 
>>>> that'll be readable in any editor, whatever its tab size setting.
>>>
>>> There's no way to do that and have hard tabs. The only way to achieve 
>>> that is by using spaces only. Using spaces only is one way to conform 
>>> to the D style guide.
>> 
>> I'm not quite with you.  True, using spaces only is one way.  But if a 
>> given coder uses only '\t' to indent (as I do), what is there to lose?
> 
> What if you want to write:
> 
> 	foo();	// comment
> 		// more comment
> 
> and have the comments line up?

Exactly why I have problems with mixing the methods. One should only tabs
or only spaces but never the two together. And if one uses tabs, then
expect other people to complain about it eventually.  :-) 

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
11/09/2006 10:47:26 AM



More information about the Digitalmars-d mailing list