I dun a DIP, possibly the best DIP ever
WebFreak001
d.forum at webfreak.org
Fri Apr 24 13:20:05 UTC 2020
On Friday, 24 April 2020 at 06:42:53 UTC, Stefan Koch wrote:
> On Friday, 24 April 2020 at 06:37:42 UTC, WebFreak001 wrote:
>> On Friday, 24 April 2020 at 06:32:16 UTC, Walter Bright wrote:
>>> [...]
>>>
>>>> // replace staticMap
>>>> alias staticMap(alias F, T...) = F!T...;
>>>
>>> alias staticMap(alias F, T...) = F!T;
>>>
>>> [...]
>>
>> this would be a breaking change:
>>
>> currently:
>> template F(T...)
>> {
>> }
>>
>> alias staticMap(alias F, T...) = F!T;
>>
>> pragma(msg, staticMap!(F, int, short).stringof);
>> -> F!(int, short)
>>
>> but with that change suddenly:
>> pragma(msg, staticMap!(F, int, short).stringof);
>> -> SomeTuple!(F!int, F!short)
>
> nope, compile error.
> F does not have an eponymous member.
um no? try it on https://run.dlang.io/ :
template F(T...)
{
}
alias staticMap(alias F, T...) = F!T;
pragma(msg, staticMap!(F, int, short).stringof);
(link shortener was broken when I posted this)
More information about the Digitalmars-d
mailing list