On type functions

Stefan Koch uplink.coder at googlemail.com
Mon May 4 17:09:40 UTC 2020


On Monday, 4 May 2020 at 15:55:44 UTC, Paul Backus wrote:
> On Monday, 4 May 2020 at 15:42:01 UTC, Steven Schveighoffer 
> wrote:
>> On 5/3/20 5:22 PM, Stefan Koch wrote:
>>> On Sunday, 3 May 2020 at 21:14:43 UTC, Max Samukha wrote:
>>>> [...]
>>> 
>>> Yes that's what it means!
>>
>> I had thought this might work, but I'm not sure.
> [...]
>> One other thing that is unclear is that map is supposed to 
>> take it's list *first* for UFCS. This would have to be 
>> different, as variadics typically come at the end of argument 
>> lists.
>>
>> -Steve
>
> If I understand the proposal correctly, it should be ok handle 
> UFCS the same way std.algorithm.map does, by taking the 
> function as a template argument:
>
> auto map(alias f)(alias[] a) {
>     // etc
> }

In my current draft type functions are not overload-able.
And having UFCS work was never really something I thought about.
I would like to work on a version which does not take UFCS just 
as a first step.


More information about the Digitalmars-d mailing list