New D coding convention style guide (brace formatting)

Walter Bright newshound at digitalmars.com
Mon Aug 21 12:51:18 PDT 2006


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.



More information about the Digitalmars-d-announce mailing list