Y
Hacker News
new
|
ask
|
show
|
jobs
by
wahern
3393 days ago
How would one explicitly allocate space for a closure? (That is, in such a way that one could handle allocation failure.) I can't find any examples nor any hints about what the syntax might look like.
1 comments
steveklabnik
3393 days ago
Closures are stack allocated unless you wrap them in something like a Box, so it's up to you. They're no different than any other value.
link