DStyle: Braces on same line

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 13 09:10:30 PDT 2014


On Saturday, 12 July 2014 at 19:01:56 UTC, Danyal Zia wrote:
> Hi,
>
> I noticed that in Andrei's talks and his book, he used braces 
> on the same line of delcaration, however Phobos and other D 
> libraries I know use braces on their own line. Now I'm in a 
> position where I need to take decision on coding style of my 
> library and I get accustomed to use braces on same line but I'm 
> worried if that would make my library less readable to other D 
> users.
>
> Should I worry about it? Or is that's just a debatable style 
> that won't really matter if it's persistent throughout library?
>
> Thanks

Here is the 'official' style that is followed by most people 
including me.

http://dlang.org/dstyle.html


More information about the Digitalmars-d-learn mailing list