Library Typedefs are fundamentally broken

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 01:52:28 PDT 2014


Am Sat, 20 Sep 2014 08:25:17 -0700
schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:

> On 9/19/14, 11:36 PM, Marco Leise wrote:
> > Am Fri, 19 Sep 2014 08:02:30 -0700
> > schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:
> >
> >> On 9/18/14, 11:45 PM, Marco Leise wrote:
> >>> We should probably revert to having real typedefs.
> >>
> >> Should not.
> >
> > Ok, but don't ask me to use
> >    alias ALfloat = std.typecons.Typedef!(float, "yummyCookie23");
> > when it could be
> >    typedef ALfloat = float;
> > ! :)
> 
> I think this is an entirely palatable idiom:
> 
> alias ALfloat = std.typecons.Typedef!(float, "ALfloat");
> 
> 
> Andrei

Funny that you mention it. I had the exact same thought
yesterday and hoped you wouldn't come around with that ...
excuse. Actually, that works for me. But it could be DRY and
look like

  typedef ALfloat = float;

-- 
Marco



More information about the Digitalmars-d mailing list