Notes on the Phobos style guide

Brad Roberts braddr at slice-2.puremagic.com
Mon Aug 16 19:08:34 PDT 2010


On Mon, 16 Aug 2010, Walter Bright wrote:

> Jonathan M Davis wrote:
> > Obviously, in my own code, I'm just going to code the way that I like, and I
> > see no point in any kind of standard D style guide with regards to braces
> > and other visual elements to relate primarily to how the code looks rather
> > than what it does.
> 
> True, but the idea of having a D style guide goes beyond just having a
> standard for Phobos. It fills a vacuum. When there is a reasonable existing
> one, lots of organizations will simply adopt it by default rather than go to
> the trouble of reinventing their own.

A good example of this is Java.  While I don't agree with the style -- it 
has a few things that _really_ annoy me -- it's followed by most 
developers.  Java code tends to look the same everywhere.  There's a huge 
value in this.

Python has achieved the same thing, even more so.  Partly based on baking 
structure into the syntax of the language.  Again, I don't agree with the 
style, but I do see the tremendous advantage in having strong consistency 
in the code base.

Later,
Brad


More information about the Digitalmars-d mailing list