[phobos] Proposal of StopWatch module

David Simcha dsimcha at gmail.com
Fri Aug 20 12:18:26 PDT 2010


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 <
simen.endsjo at pandavre.com> 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
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100820/20c420b8/attachment.html>


More information about the phobos mailing list