4 ms·
Enriquto asked for closures which remain valid after the enclosing function has returned — upward funargs. If the closed-over variables need to survive the par
by gdwatson 11y ago
Enriquto asked for closures which remain valid after the enclosing function has returned — upward funargs. If the closed-over variables need to survive the parent’s stack frame, where else would you put them?
- jjnoakes 11y agoThe variables could be static, or optimized away, or... I'm not saying every closure can be done without allocation. I'm saying many useful ones can be though.