Coding Standards

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Jul 15 08:55:13 PDT 2011


On 7/15/11 10:09 AM, Russel Winder wrote:
> On Fri, 2011-07-15 at 16:25 +0200, Trass3r wrote:
>> Am 15.07.2011, 09:53 Uhr, schrieb Jonathan M Davis<jmdavisProg at gmx.com>:
>>> The brace on its own line and the line length limit need to be added as
>>> notes for Phobos, but I'm not sure that they really need to be put in
>>> the guide
>>
>> Brace on its own line really should be put there.
>> It adds a lot to the readability of nested code.
>>
>> And there's lots of D code using that awkward
>> if () {
>> }
>>
>> style. Gross!
>
> Actually I think that the above is the only acceptable style of brace
> placement, especially compared to
>
> if ( )
> {
> }
>
> which is anathema, no code should ever be allowed to use it.
>
> (If you read this as a troll, then you have missed the point of
> moralization by satire.)

(long sigh of relief after reading the last paragraph)

Andrei


More information about the Digitalmars-d mailing list