← Back to context

Comment by elcritch

3 hours ago

> it allows the async implementation to do the "prepare operation, suspend until completed, wake up" dance, where the threaded implementation would just run the blocking syscall directly. There are plans to add stackless coroutines

Yeah so that's a lot of hidden magic and implicit logic. ¯\_(ツ)_/¯

It's all implemented as explicit userspace code that follows the same rules as the rest of the language. There is quite literally no implicit logic.

  • "It's actually explicit if you look at how it's implemented" is true for everything.

    If you look at how it's implemented you can see that the classic "XOR a register with itself to zero that register" trick is in fact basically free in a modern CPU rather than using up the ALU because of how register renaming is implemented. But hopefully we're not pretending that "You could buy the CPU vendor's technical manuals" makes this now explicit.