Library Typedefs are fundamentally broken

simendsjo via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 23 12:22:43 PDT 2014


On 09/23/2014 08:05 PM, ketmar via Digitalmars-d wrote:
> On Tue, 23 Sep 2014 16:15:19 +0000
> "Adam D. Ruppe via Digitalmars-d" <digitalmars-d at puremagic.com> wrote:
> 
>> struct HMENU { void* _; alias _ this; }
>>
>> Don't even have to import a Phobos module for it!
> remember my "uuugly" on Typedef! and __MODULE__? well, i was wrong, it
> was just "ugly". and now i found really uuugly thing. please, even long
> Typedef! stinks less than this poor uuugly thing.
> 

I disagree and think this code is idiomatic - it only uses regular
features. If you mean `_`, that usually means "I don't care" or "Anything".

But looking at Typedef!, it uses Proxy! rather than just alias. Haven't
dived into Proxy, so the semantics might be quite different, perhaps subtly.


More information about the Digitalmars-d mailing list