template statistics

jmh530 john.michael.hall at gmail.com
Wed Jun 3 15:14:21 UTC 2020


On Wednesday, 3 June 2020 at 11:22:23 UTC, Stefan Koch wrote:
>[snip]
> Oh yes.
> sumType does not need to introduce new symbols.
> Therefore it should be handled in a way which does not 
> introduce new symbols.
>
> type functions are one way to make this happen.
> However changes to the language are hard justify therefore I am 
> currently revisiting,
> approaches to infer type-function-like behavior and transform 
> them behind the scenes.
> (Which is a HUGE pain, because you have to transform recursion 
> into loops, which is a hard problem in itself, AND the user 
> probably would rather have written a loop, but was forced by 
> the language to use recursion. )
>
> alas having my work being useful in the language is more 
> important than to have a better language.
>
> I will continue on type functions; if the conservative 
> approaches don't work out.

Thanks.

The problem almost sounds like you need an inliner for types in 
the compiler.


More information about the Digitalmars-d mailing list