3 ms·
It makes sense in a low level language like zig, because an async functions there truly is a function frame (in the sense of set up a stack and save your regist
by throwawaymaths 4y ago
It makes sense in a low level language like zig, because an async functions there truly is a function frame (in the sense of set up a stack and save your registers to be popped off of it at the end) but in high level languages - and even rust, if my understanding of how async works in rust - it's different and calling it a function seems incorrect.
- throwawaymaths 4y agoAnyone care to explain their downvotes?
- Waterluvian 4y agoFWIW I'm really appreciating your comments. These are all models. I really enjoy hearing how others perceive things.
- int_19h 4y agoWhy do you care what it "truly" is under the hood? The observable behavior is what matters, and in many languages, this is made explicit by some kind of "as-if rule".
- throwawaymaths 4y agoFor a low level language having a proper mental model is important. Suppose you need to inspect the generated assembly.