3 ms·
I'm really digging what I'm reading so far. if (optional_foo) |foo| { doSomethingWithFoo(foo); } ..could be flow sensitive with optional_foo being non
by karmakaze 5y ago
I'm really digging what I'm reading so far.
if (optional_foo) |foo| {
doSomethingWithFoo(foo);
}
..could be flow sensitive with optional_foo being non-? inside the block like some languages have done.
Well the In-depth Overview ticks all my boxes giving Zig worth a deeper look:
> Zig 0.5.0 introduced async functions. This feature has no dependency on a host operating system or even heap-allocated memory. That means async functions are available for the freestanding target.
> Zig infers whether a function is async, and allows async/await on non-async functions, which means that Zig libraries are agnostic of blocking vs async I/O. Zig avoids function colors.
> The Zig Standard Library implements an event loop that multiplexes async functions onto a thread pool for M:N concurrency. Multithreading safety and race detection are areas of active research.
- nrclark 5y agoIt's got really cool metaprogramming features too, if you like those. Kind of like C++ consteval/constexpr but on steroids. Language BDFL doesn't recommend using it in prod yet, but I've really enjoyed a couple of hobby projects.