Library Typedefs are fundamentally broken

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 08:04:39 PDT 2014


On 9/21/14, 1:52 AM, Marco Leise wrote:
> 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.

Why would anyone hope a valid idiom were not mentioned?

> Actually, that works for me. But it could be DRY and
> look like
>
>    typedef ALfloat = float;

DRY is DRY. Bloating the language is bloating the language.


Andrei



More information about the Digitalmars-d mailing list