indent style for D

Marco Leise Marco.Leise at gmx.de
Sun Jan 29 13:39:51 PST 2012


Am 29.01.2012, 21:20 Uhr, schrieb Timon Gehr <timon.gehr at gmx.ch>:

> On 01/29/2012 08:26 PM, Marco Leise wrote:
>> Am 29.01.2012, 16:23 Uhr, schrieb Trass3r <un at known.com>:
>>
>>>> Am I mistaken? If no, am I missing some major spaces advantages? If
>>>> no, lets use tabs. Perhaps, there is no tool that will convert
>>>> (convert right, not somehow, see article) tabs<->spaces in D code.
>>>
>>> There wouldn't be any problem if people were able to use tabs for
>>> indentation and spaces for alignment, i.e. in cases like
>>> if (cond1 &&
>>> cond2)
>>>
>>> But people are dumb and many project leaders "take no risks" and
>>> require spaces everywhere instead of doing it properly.
>>
>> If it cheers you up, I use that style. Once you get used to 'smart tabs'
>> it is like using spaces. Just now and then I catch myself using tabs on
>> the alignment for local variable comments:
>>
>> int foo; // does something (tabs)
>> int bar; // something else (spaces)
>>
>> Then again "tabs for indentation only" is a simple rule, that would have
>> turned the tabs into spaces in this example - if editors supported it.
>
> *Real* editors can be configured to support smart tabs.

I sense a hint to some obscure Unix tool like vim or emacs.


More information about the Digitalmars-d mailing list