As part of general clean-up of Phobos, I propose the following:

1.  We update the %(&#$# style guide to not say this.

2.  Anywhere where the OLD_SCHOOL style is used, for example:

enum MyEnum {
    /// Has DDoc.
    FOO,

    /// Has DDoc
    BAR
}

we should simply change to:

enum MyEnum {
    /// Has DDoc
    foo,

    /// Has DDoc
    bar,

    // Undocumented, for compatibility only.
    FOO = foo,

    // Undocumented, for compatibility only.
        BAR = bar
}

I'll be doing this in my dstats library and I think we should gradually do
it in Phobos as a "fixing broken windows" when already working on a module.

Also, do we want the first letter to be or not be capitalized?  MyEnum.Foo
or MyEnum.foo?  There's inconsistency within Phobos about this, too.



On Fri, Aug 20, 2010 at 3:11 PM, Simen Endsjø Haugen <
[email protected]> wrote:

>  On 20.08.2010 21:06, Andrei Alexandrescu wrote:
> (...)
>
>
> At any rate, please no all-caps constants :o).
>
>  http://www.digitalmars.com/d/2.0/dstyle.html:
>
> (...)Submissions to Phobos and other official D source code will follow
> these guidelines.(...) Enum member names Are in all caps.
>
> _______________________________________________
> phobos mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/phobos
>
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to