Re:Zig 0.13.0 Release Notes
by qwelias on Friday June 07, 2024 @06:58PM
(#40613787)
From what we know their async/await should be noticeably distinct from the usual, otherwise the previous revert was for nothing.
[ Parent
| on HN ]
I still can't find a decent explanation as to why zig, a C replacement needs to have Async built in by default. I actually think this should belong to a higher level abstraction.
Re:Zig 0.13.0 Release Notes
by kristoff_it on Monday June 10, 2024 @09:27AM
(#40633436)
Zig doesn't have to have it, but in Zig's specific case it can offer a surprisingly innovative implementation of it. The grandparent post mentioned how async/await infects languages (it does) and Zig is in a unique position where this would be not as true. Note that async/await has to gain a lot by being "built in" as opposed to a pure userland thing, as it basically is used to rewrite function bodies and mess with calling conventions.
As for the correct level of abstraction of async/await I believe that it's actually a very low-level primitive that should only be offered in low-level languages as it's very footgunny to use in high-level languages and generally worse than actors/csp.