Macro templates [Was: Re: Compile-time fold expression vs recursive template]
    Stefan Koch 
    uplink.coder at googlemail.com
       
    Fri Jun 19 18:52:38 UTC 2020
    
    
  
On Friday, 19 June 2020 at 18:30:28 UTC, Paul Backus wrote:
> To achieve Nick Treleaven's goal of re-using the same Scope for 
> each "iteration", all that is necessary is for the compiler to 
> implement tail-call optimization for macro templates (a 
> well-known and well-studied technique). `staticMap` can then be 
> easily re-written to use a tail-recursive helper template.
I've tried to implement TCO, and it's really hard to do.
I would think it's best to present iteration as well interation.
There is no need to go into awkward recusion patterns.
    
    
More information about the Digitalmars-d
mailing list