New D coding convention style guide (brace formatting)

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue Aug 22 05:48:31 PDT 2006


Walter Bright wrote:
> Bruno Medeiros wrote:
>> Walter Bright wrote:
>>>
>>> http://thc.segfault.net/root/phun/unmaintain.html
>>>  From - Mon
>>
>> Speaking of which (but seriously), we may not get a consensus on tabs, 
>> and maybe justifiedly so, but one other thing with DMD's coding 
>> convention that troubles me is the braces formatting:
>>
>>     if (b)
>>     {    dg();
>>          return true;
>>     }
>>
>> ... whoa :/ . Where did that come from? It's unusual (I personally 
>> have never seen C-family code formatted that way), and seems awkward 
>> to me. 
> 
> It's just:
> 
>     if (b)
>     {
>        dg();
>        return true;
>     }
> 
> compressed to save precious vertical screen space.

Then how about K&R style?



More information about the Digitalmars-d-announce mailing list