170
Rust-Written Zlib-rs Is Not Only Safer But Now Outperforming Zlib C Implementations
(www.phoronix.com)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
Well, the others already responded to some of your points, I'll try to answer the rest.
Well, I don't know what the Ada system is like, but I will say that Rust has one of the nicest module systems, in my opinion. "Serious" isn't necessarily the adjective I would choose for it, but it works well despite being fairly simple and what I love in particular, is that you can start a codebase small and grow it larger and larger without breakage of module paths.
You do need to build a midsized codebase to really experience that, but basically you can go from a file to a folder to a folder with lots of subfolders without ever changing the imports, even when you move the actual type definition to be further down the tree.
As the others already said, it's a feature. It comes from the functional world (putting data flow and control flow on the same path) and yeah, I find if you want to do solid error handling, it's really good at forcing you to do it.
If you don't want to do solid error handling (e.g. because you're just writing a script or the startup logic of an application), you can get behavior very similar to exceptions by using anyhow for error handling.
Well, the borrow checker also kind of obsoletes relying on immutability for correctness. If you actually want to share that tree between threads, you do need a mutex then, but within the same thread just the ownership and mutability rules prevent you from updating the tree while others might be reading it. Effectively, if the compiler allows you to update the tree, it is safe to do so.
This is IMHO not talked about nearly enough, but Rust effectively makes mutability a viable strategy again, particularly because it also forces you to make mutability explicitly visible at all times. It is somewhat antithetical to functional programming to mutate a variable, because it is a side-effect. But if this side-effect cannot bite you, it's not actually a problem.
In particular, always cloning values is only not a problem, if you're really doing puristic FP. As soon as you store state and you duplicate this state to update it, you might have two different states in your application.