News for hackers. Stuff that matters.
Re:Zero-cost futures in Rust by saynsedit on Thursday August 11, 2016 @07:44PM (#12272529)
I think this is becoming a semantic argument.

I think we all understand that Rust/C++ closures don't necessarily allocate memory. His point is simply that by using a rust closure to asynchronously handle an event a heap allocation must be done. Compare to the stack swapping method of classical coroutines, which wouldn't require a heap allocation.

I recognize that with Rust zero-cost futures, one big heap allocation is done for the entire futures combination and is roughly analogous to one big eager stack allocation for a coroutine.

Re:Zero-cost futures in Rust by steveklabnik on Thursday August 11, 2016 @07:53PM (#12272579)
Yes, I think so too. I just want to make sure the semantics are clear. I think your summary here is excellent.