2 ms·
> guaranteed optimisation to a single stack frame and no allocation where possible You are literally describing stackless coroutines. And the generator state t
by eddyb 8y ago
> guaranteed optimisation to a single stack frame and no allocation where possible
You are literally describing stackless coroutines. And the generator state transform is that optimization.
If you want to get this without using generators explicitly, it's still stackless coroutines just not how Rust supports stackless coroutines. There was some discussion about making it more implicit but no progress was made in the implicit direction.
- gpderetta 8y agoVery much not. I want first class stackful continuation semantics that behave as stackless in at least all (but ideally more) scenarios where a stackless continuation would.