static map as a type function

Stefan Koch uplink.coder at
Thu Sep 24 15:08:05 UTC 2020

On Thursday, 24 September 2020 at 05:38:07 UTC, H. S. Teoh wrote:

> What we need is imperative syntactic sugar that lowers to 
> recursive templates under the hood.  (After all, in theory, 
> every Turing-complete language is just syntactic sugar over 
> lambda calculus. :-P)
> That, plus implement template optimization schemes to lower the 
> cost of recursive templates.  The template analogue of 
> tail-call optimization is a good first step, for example.  
> Another good direction to investigate is instantiation 
> elimination: i.e., defer the actual instantiation of a template 
> (with its associated costs of copying the AST and substituting 
> arguments, generating symbols, etc.) until it's determined to 
> be necessary.
> T

I am not sure if what you are saying is actually serious or not 

You're suggesting to provide in iterative syntax for the 
Rewriting that internally into recursive templates.
And then try to recover the iterative form to get the speed.

Did I paraphrase correctly?

More information about the Digitalmars-d mailing list