2 ms·
> These algorithms use the data received from userspace in order to index into a lot of arrays and thus benefit from Rust's memory safety. Yeah, thats not a go
by lionkor 3y ago
> These algorithms use the data received from userspace in order to index into a lot of arrays and thus benefit from Rust's memory safety.
Yeah, thats not a good argument for Rust specifically. Maybe Zig would be interesting for array-specific things like sentinel-terminated arrays ans their amazing C interop. Further, Zig code is unmatched in how explicit everything is. There is no abstraction hiding complexity, its built on the idea of custom allocators from the ground up.
This seems like someone looking for a usecase for Rust over C, rather than someone looking for a better solution altogether. Thats okay, I guess, but Rust does not do array bounds checking very well and the borrowchecker doesnt help there at all. The large amount of hidden complexity in a lot of the language dont make it more safe by any means.