On Friday, 3 August 2018 at 14:46:59 UTC, Jonathan Marler wrote:
After thinking about it more I suppose it wouldn't be that complicated to implement. For delegate literals, you already need to gather a list of all the data you need to put on the heap, and if it can all fit inside a pointer, then you can just put it there instead.

Nope, immutability (and no escaping) are additional requirements, as each delegate copy has its own context then, as opposed to a single shared GC closure.

In the end, I think that most if not all use cases would be better off using the library solution if they want this optimization.

I disagree.

Reply via email to