Library Typedefs are fundamentally broken

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 23 16:03:07 PDT 2014


On 9/23/14, 3:58 PM, Timon Gehr wrote:
> On 09/23/2014 06:01 PM, Andrei Alexandrescu wrote:
>>>
>>> alias HMENU = Typedef!(void*, __MODULE__ ~ ".HMENU");
>>> alias HFONT = Typedef!(void*, __MODULE__ ~ ".HMENU"); // oops
>>
>> mixin(makeTypedef!("HMENU", void*));
>> mixin(makeTypedef!("HFONT", void*));
>>
>> I said and I repeat: I do agree it's less convenient than a baked-in
>> facility. Even with the proper default arguments and all. ...
>
>
> But at that point, why not mix in an entire struct declaration?

That's fine too! I'm all for effective software development! -- Andrei


More information about the Digitalmars-d mailing list