We need to have a way to say "convert this nested function into a struct"

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 5 23:16:16 PDT 2015


Nested functions that allocate their environment dynamically can be 
quite useful. However, oftentimes the need is to convert the code plus 
the data needed into an anonymous struct that copies the state inside, 
similar to C++ lambdas that capture by value.

I wonder how to integrate that within the language nicely.


Andrei


More information about the Digitalmars-d mailing list