Follow

re: true co-routines in C 

@amiloradovsky@functional.cafe what I'm trying to say is that semantics don't change as far as c/c++ are concerned. Running out of stack space is like running out of ram/rom for your code or data segment, and again optimizations are everything when you have to deal with these kind of low level details. People do write c/c++ code with specific platforms and specific optimizations in mind, not for portability, but for readability. They may ban some compiler flags and require others, and the language standards are intentionally vague in places to allow for such things.

I'm trying to answer your question "how do you jump into a procedure without storing return address in stack", and I guess my answer is "the language allows this in a natural way, so it is in the realm of compilers to support this kind of use case well (unless you want to jump across ABI in this fashion)".

· · SubwayTooter · 1 · 0 · 0
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.