Coding Standards

Russel Winder russel at russel.org.uk
Fri Jul 15 08:09:06 PDT 2011


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.) 

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110715/0085077f/attachment.pgp>


More information about the Digitalmars-d mailing list