D naming style?

Michel Fortin michel.fortin at michelf.com
Sat Sep 5 03:20:47 PDT 2009


On 2009-09-04 21:07:01 -0400, Jarrett Billingsley 
<jarrett.billingsley at gmail.com> said:

> On Fri, Sep 4, 2009 at 8:42 PM, Ali Cehreli<acehreli at yahoo.com> wrote:
>> Is there a common(-ish) naming style for D?
>> 
>> - camel case or underscores within words of names?
>> 
>> - type names begin with capital?
>> 
>> - underscore before or after member names?
>> 
>> - enum values lowercase?
>> 
>> - constant names?
>> 
>> - etc.? :)
>> 
>> Do you have a document that you would like to share?
> 
> There is a "D style guide" in the D spec that briefly mentions naming
> conventions, but I'm not sure how many people use it / are aware of
> its existence.

Here it is: <http://www.digitalmars.com/d/2.0/dstyle.html>.

I've also written a guide on how to name things, but, as far as I know, 
nobody is following it at the moment. Hopefully it can be improved and 
serve as the basis for naming things in Phobos (although I'm beginning 
to be skeptical about that). See 
<http://prowiki.org/wiki4d/wiki.cgi?DProgrammingGuidelines>.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list