On alias a = b

Simen kjaeraas simen.kjaras at gmail.com
Fri Mar 18 14:03:53 PDT 2011


On Fri, 18 Mar 2011 21:41:56 +0100, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> On Fri, 18 Mar 2011 16:37:49 -0400, Andrei Alexandrescu  
> <SeeWebsiteForEmail at erdani.org> wrote:
>
>> On 3/18/11 3:28 PM, so wrote:
>>> alias a(T) = b(T, known_type);
>>>
>>> Would it be an overkill?
>>
>> It's part of the evil plan.
>
> (I think there is a typo above, shouldn't it be alias a(T) = b!(T,  
> known_type) ? )

Could also be used for currying, I guess.

void foo(int i, string s){}
void foo(float f, string s){}

alias bar(value) = foo(value, "Move along");

-- 
Simen


More information about the Digitalmars-d mailing list