4 ms·
The examples described here surprising. The first two "issues" are handled quite well in an IDE environment, where jump to definition immediately shows me what
by sdht0 6y ago
The examples described here surprising. The first two "issues" are handled quite well in an IDE environment, where jump to definition immediately shows me what I'm looking for. And as I said in another comment, the third "issue" is immediately highlighted by the compiler with a clear error message. I have to wonder if these are really complex design wart in the Rust language that I somehow found quite intuitive or comes from an insufficient effort or misunderstanding of how or why these features work. Rust has other complexity issues no doubt, but I don't feel these belong to that discussion.
> I wonder if part of this has to do with the fact that Rust seems to appeal to a certain type of programmer who is attracted to esoteric topics and arcane knowledge
I find this an unfair take, especially having been a witness to the design process in Rust, where a lot of emphasis and effort is put into coming up with designs that have the right complexity-usefulness balance.
A better way to put it is that Rust matches the values that I care about in a programming language [0][1]. What I love about Rust is that I can rely on it to point out a wider class of mistakes that I'd often make in other languages. Forgetting to deallocate a pointer (C/C++) or using multiple objects when trying to run a synchronized code (Java) often need non-trivial time to debug that ultimately don't teach me anything other than to be more careful. In Rust, I can offload that cognitive load to the compiler. And I find that delightful and satisfying. If it compiled, it is highly likely to be correct, moreso after a refactoring session spanning the entire project. And all this makes the effort in learning whatever complexity Rust has worth it. And I say this with the knowledge that the Rust team is doing their best to address the complexity concerns seriously.
> what a programming language would look like which has an ownership system like Rust, algebraic types, and a trait system, but puts a ruthless emphasis on productivity and eschewing complexity.
Do give this a try. It is likely that you'll have to make different tradeoffs. Or you'll discover novel ideas. Either ways, it'll be a learning experience.
[0] https://www.slideshare.net/bcantrill/platform-values-rust-and-the-implications-for-system-software https://www.slideshare.net/bcantrill/platform-values-rust-an...
[1] https://www.infoq.com/presentations/rust-tradeoffs/ https://www.infoq.com/presentations/rust-tradeoffs/