Naming Conventions & Style Guide?

Jonathan M Davis jmdavisProg at gmx.com
Sat Jan 22 21:28:12 PST 2011


On Saturday 22 January 2011 20:51:47 Andrej Mitrovic wrote:
> Hmm.. I thought naming enums with capital letters was a standard thing
> in D land. I prefer them that way since they're constants, and since I
> almost always use a tag for an enum I never mistake it for anything
> else. YMMV.

The problem is that constants are used all over the place in D - far more than 
you'd use in most other languages (primarily because of CTFE, I belive). If you 
use all-caps for stuff like enums, then you're constantly using variables which 
are all in caps. It would get really annoying. In particular, Andrei doesn't 
like that, so he wants constants - which would include all enums - to have the 
same naming convention as the other variables.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list