Skip to main content

Questions tagged [closure]

3 votes
0 answers
142 views

What are the drawbacks with lambda lifting for non-escaping closures?

I am considering to implementing Lambda lifting for non-escaping closures (and not support escaping closures, hence also ruling out partial application with closures). I understand that this can add ...
Jonas's user avatar
  • 705
4 votes
1 answer
1k views

How do languages with only reference counting deal with closures?

Reference counting works best if there are no cycles. But closures that allow access to every variable in the parent scope by default automatically create cycles. There are obvious solutions like only ...
user23013's user avatar
  • 3,314
6 votes
2 answers
644 views

How can I compile closures in WebAssembly?

Consider the following pseudocode: ...
Aster's user avatar
  • 3,458
12 votes
6 answers
3k views

Early binding, mutual recursion, closures. Can I have all three?

Take this Python snippet of two functions that are mutually recursive and form closures: ...
BoppreH's user avatar
  • 1,491