First life-signs of type functions

Nick Treleaven nick at geany.org
Sat May 30 11:15:19 UTC 2020


On Monday, 11 May 2020 at 21:58:57 UTC, Stefan Koch wrote:
> In a type function alias cannot bind to values at all.
> It can only bind to symbols or types.
> If you want to pass values in you have to use the appropriate 
> parameter type.

Although it's called a 'type function', it should be able to make 
all template recursion unnecessary. If you can't have an alias 
parameter that might be a value or not, then that's a fundamental 
limitation to achieving this goal. A template alias parameter can 
take anything, as can a template sequence parameter.

We need type functions to be able to accept any compile-time 
sequence for processing, how can we do that if alias[] won't 
accept values? People will have to resort to template recursion 
to have a complete solution.


More information about the Digitalmars-d mailing list