4 ms·
Are you possibly thinking of Nim instead of Zig here?
by nrclark 5y ago
Are you possibly thinking of Nim instead of Zig here?
- karmakaze 5y agoThank you, you are so right. I was thrown off by seeing a mix of snake_case and camelCase. I'll have to give Zig a read and make an actual assessment. Glad for the possibilities!
- karmakaze 5y agoI'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.