4 ms·
It's good to see that OOM errors can be handled in Rust now, at least in unstable. Zig has a similar approach that is pretty cool. I don't know of any other la
by marcinjachymiak 5y ago
It's good to see that OOM errors can be handled in Rust now, at least in unstable.
Zig has a similar approach that is pretty cool. I don't know of any other language that let's you handle it like this https://ziglang.org/documentation/0.8.0/#Heap-Allocation-Failure https://ziglang.org/documentation/0.8.0/#Heap-Allocation-Fai...
- dralley 5y agoThe zig approach seems really well suited to low-level libraries where you really need to handle these errors (and custom allocators, etc.) but it's kind of annoying for general purpose programs.