Comment by tialaramex
3 hours ago
"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.
In most languages, async is implemented as a special feature in the compiler, not as userspace code. You can't just jump-to-definition of async/await keywords in languages that use them. async/await are not keywords in Zig, they are regular function calls. There is obviously a categorically different level of insight between jumping to library code and digging into compiler internals.
The key point is, it's not language magic. It's library magic. You can write your own IO implementation if you want it to work a different way.