On type functions

Steven Schveighoffer schveiguy at gmail.com
Mon May 4 14:16:39 UTC 2020


On 5/4/20 8:37 AM, Jacob Carlborg wrote:
> I think it would be very unfortunate if the existing algorithms didn't 
> work and they need to be recreated. Then we're back to what we have 
> today, like `staticMap` and `Filter`, (perhaps just with a different 
> implementation).

No, staticMap has to be different because it accepts its parameters via 
compile-time parameter list and called differently.

If using alias in the normal parameter list is acceptable, then it just 
becomes another overload.

I think you still need a separate implementation due to the mechanisms 
needed for "storing" aliases. But the syntax should be identical to what 
you wrote.

-Steve


More information about the Digitalmars-d mailing list