Naming convention in Phobos

spir denis.spir at gmail.com
Tue Mar 8 11:24:16 PST 2011


On 03/08/2011 07:28 PM, %u wrote:
>> 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.)

Right. Did not even know "Real" is a keyword ;-) (the above list is not copied 
from my 'real' code).

Denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d mailing list