3 ms·
>a language with often comparable performance that is ALSO much safer There are domains where performance is critical and safety isn't so important (e.g. video
by logicchains 1y ago
>a language with often comparable performance that is ALSO much safer
There are domains where performance is critical and safety isn't so important (e.g. video games). Zig has an advantage in such domains because of the pervasive support for passing around allocators in the standard library (avoiding hidden allocations, and allowing efficient memory reuse via block allocators), while in the Rust stdlib custom allocators are relatively cumbersome to use (and not easy to prove safe to the compiler).
- hardwaresofton 1y agoAgreed, I really like Zig's explicit allocation (and to be fair, lots of people from Rust like it too[0], it's just such an insane lift that who knows when it will stabilize) The new "managed" async strategy (I was previously mistaken thinking it was the same as sans-io) is also really intriguing IMO, and feels like a fantastic balance (people in Rust are doing this too, but for the unrelated reason of trying to support various async runtimes). [0]: https://github.com/rust-lang/rust/issues/32838 https://github.com/rust-lang/rust/issues/32838