Naming convention in Phobos

%u wfunction at hotmail.com
Tue Mar 8 10:28:11 PST 2011


> Fortunately, these are "very not" any kind of <<most logical
choices>>. Neither according to D's own naming convention, nore
(imo) according to plain common sense. I have the same kind of use
case as you, apparently (including even a 'TypeCodes' enum!), and
thank to D's very weird naming, /I/ can use sensible names for enum
members and various other symbol series, without resorting to a
kind of prefix code or such.
// same names as in the source language, thanx!
enum TypeCodes
{
     Integer,
     Real,
     Text,
     Logical,
     Array,
     ...
}


Noticed that you capitalized "real", which would have collided with
the keyword. (My point wasn't that "long" was the best name, but
that this situation obviously occurs often enough to merit
consideration of a different casing convention.)


More information about the Digitalmars-d mailing list