6 ms·
> It's not like Java is any simpler. Can attest. It's easier to learn the rules of Java the language, but way harder to learn how to write good Java software.
by Twisol 6y ago
> It's not like Java is any simpler.
Can attest. It's easier to learn the rules of Java the language, but way harder to learn how to write good Java software. To some extent, Rust forces you to begin learning both at the same time, which is of course more difficult.
What always surprises me is how much "good Rust software" actually coheres with "good software". I'm not saying that you should write software in any language as though it were Rust -- every language has its own effective praxis. Rather, since Rust forces you to pick up some of the rules of good design as you learn, those rules can transfer to other ecosystems, forming part of a language-agnostic basis of engineering. I think that's really cool.
A good example is handles over pointers [0]: recognizing that pointers/reference embody two orthogonal concerns, address and capability, lets you see how to separate them when it benefits the design. Rust's extremely strict single-ownership model often forces you build separate addressing systems, allowing disparate entities to address and relate to each other in complex patterns, while consolidating all capability to affect those entities into a single ownership root.
The mental model of single-ownership itself is valuable for managing the complexity of a large network of entities, and knowing when you can or should break it in other languages has been really valuable to me.
[0] https://floooh.github.io/2018/06/17/handles-vs-pointers.html https://floooh.github.io/2018/06/17/handles-vs-pointers.html