The new core.sys.windows
Mike Parker via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 14 18:51:48 PDT 2015
On Wednesday, 14 October 2015 at 21:52:05 UTC, Vladimir Panteleev
wrote:
> For example: usage of named enums. In C, all enums (or
> #defines) all live within the name namespace, with a prefix
> serving as the disambiguating "namespace", and all are
> implicitly convertible to each other. In many places, the
> bindings use named enums instead, which provides the advantage
> of strong typing - if a function accepts a parameter of a
> certain enum, you cannot accidentally pass a member of another
> enum.
>
I think named enums are a bad idea. For one thing, it's
inconsistent with the other system modules. For another, it's a
pain point for porting existing C code to D. If they are kept,
then at the very least aliases ought to be provided.
More information about the Digitalmars-d
mailing list