2 ms·
I believe function coloring has never been about syntax but about semantics. It's not possible to yield while waiting for an async function to resolve without b
by Arnavion 7y ago
I believe function coloring has never been about syntax but about semantics. It's not possible to yield while waiting for an async function to resolve without being async yourself. And if you have a choice between an async and a sync function that you could call from your async function, you should prefer to call the async one to avoid stalling whatever executor is driving your function.
Zig isn't avoiding it; it's impossible to avoid. Zig is just inferring the async-ness of the function automatically without you needing to write a keyword for it.