News for hackers. Stuff that matters.
Re:Why Rust closures are somewhat hard by pavlov on Monday September 10, 2018 @03:33PM (#17954445)
Apple’s block extensions added a closure syntax to C.

The runtime’s public API is very small: https://github.com/mackyle/blocksruntime/blob/master/BlocksR...

Behind the scenes it implements reference counting though.

Re:Why Rust closures are somewhat hard by mikeash on Monday September 10, 2018 @03:35PM (#17954466)
Should be able to do it without refcounting if you wanted to go even more minimal, too. Make a call to copy the storage, and another one to destroy it. Then the user can use whatever lifetime management they already use for other things.