Library Typedefs are fundamentally broken

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 18 23:45:05 PDT 2014


Am Fri, 19 Sep 2014 05:53:00 +0000
schrieb "bearophile" <bearophileHUGS at lycos.com>:

> Andrei Alexandrescu:
> 
> > Wyatt:
> >> (I wouldn't consider the cookie parameter a better solution; I 
> >> would consider it a wart.)
> >
> > That's the right solution.
> 
> The cookie parameter is a ugly wart.
> 
> Bye,
> bearophile

We should probably revert to having real typedefs.
I find myself not using Typedef either. Instead I use wrapper
structs with alias this, because they fit the shoe much better
by introducing a unique symbol in a straight forward way :)

Rationale

Typedef is not flexible enough to cover all use cases.
This is better done with a language solution.

-- 
Marco



More information about the Digitalmars-d mailing list