The D Style and tab sizes

Chris Miller chris at
Sun Sep 10 17:14:49 PDT 2006

On Sun, 10 Sep 2006 20:03:39 -0400, Walter Bright  
<newshound at> 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?

<tab> foo(); <spaces> // comment
<tab>     <spaces>    // comment

match up tabs for indentation, use spaces for further alignment.

More information about the Digitalmars-d mailing list