4 ms·
Isn't this one of the preconditions for bringing async/await back to Zig? https://github.com/ziglang/zig/wiki/FAQ#what-is-the-status-of-async-in-zig https://gi
by foresto 1y ago
Isn't this one of the preconditions for bringing async/await back to Zig?
https://github.com/ziglang/zig/wiki/FAQ#what-is-the-status-of-async-in-zig https://github.com/ziglang/zig/wiki/FAQ#what-is-the-status-o...
- geodel 1y agoReading the link, it seems to me async is never coming back or at least not till 2028.
- mlugg 1y agoI don't understand how you reached this conclusion. Nothing is decided for sure, but the plan is most likely to re-introduce stackless coroutines as a set of lower-level primitives [0], and support implementing the planned `std.Io` abstraction [1] using them. The usage isn't quite as "pretty" as our old async/await syntax, but this approach sidesteps a lot of design problems, allows applications to seamlessly switching between different async implementations (e.g. stackless vs stackful), and simplifies the eventual language specification. It's true that we're not doing this work right now, but that doesn't mean async is "never coming back", nor that you'll be waiting "till 2028". [0]: https://github.com/ziglang/zig/issues/23446 https://github.com/ziglang/zig/issues/23446 [1]: https://github.com/ziglang/zig/blob/async-await-demo/lib/std/Io.zig https://github.com/ziglang/zig/blob/async-await-demo/lib/std...
- geodel 1y agoSure, I was just tempering expectations. In large project there are always tons of competing priorities competing. Considering many things needed before async and not all of them may be complete before other important work like incremental compilation, new backends etc. It maybe a while to see async.
- AndyKelley 1y agoI've got that stuff all figured out, should have some interesting updates for everyone over the next 2-3 months. Been redoing I/O from the ground up - mostly standard library work.
- sgt 1y agoIs it really that important though, to have async/await? I mean, do Zig developers actually need it?
- AndyKelley 1y agoFunny, this is the central question of the talk that I am working on for Systems Distributed in Amsterdam next week.
- sgt 1y agoHoping they make the talks available afterwards on YouTube or somewhere.
- nasretdinov 1y agoIMO there are plenty of cases where you don't need to sqeeze every little drop of performance by going all in with epoll/io_uring directly, but you still want to handle 10k+ concurrent connections more effectively than with threads
- sgt 1y agoepoll combined with a thread pool
- whitehexagon 1y agoKeeping Zig simple and close to C seems the most beneficial. Something that can be used everywhere that C is currently used. Otherwise it moves from systems programming language into applications programming.
- audunw 1y agoIts the feature I’m waiting for before I start a project I’ve wanted to do for a while in Zig. I’d say it’s really important to get async nailed before 1.0, because it’s potentially one of the biggest killer features for many projects. Zigs async isn’t just about I/O, I’ve found the feature useful in hardware simulation code as well.