News for hackers. Stuff that matters.
Re:My tutorial and take on C++20 coroutines by hctaw on Tuesday February 23, 2021 @01:34PM (#26240913)
I think if your syntax and semantics imply the stack-ness of your coroutine implementation then you you have a language design problem. Coroutines are subroutines with two additional primitives (resume after call, and yield before return). Whether `yield`/`resume` imply stack swapping or a state transition between activation frames is just an implementation detail. Both have tradeoffs, to be sure.
Re:My tutorial and take on C++20 coroutines by gpderetta on Friday February 26, 2021 @06:49AM (#26273834)
> I think if your syntax and semantics imply the stack-ness of your coroutine implementation then you you have a language design problem

A lot of languages, including C#, python, C++, rust and many others specify the stackless-ness of coroutines. So it is not just an implementation detail. You could argue that specifying these semantics is a problem, and I would actually agree, but obviously it is not something many, if not most, language designers agree.