3 ms·
This I buy. I’ve never quite gotten why the rust crowd thinks manual memory management and zero cost abstractions are the only bullet points that matter. Many o
by TylerE 4y ago
This I buy. I’ve never quite gotten why the rust crowd thinks manual memory management and zero cost abstractions are the only bullet points that matter. Many of us would happily switch to a language that didn’t have either, if it made our day to day work not feel like rocket science and the sharp edge of the “never write code as cleverly as you can, because you won’t be able to debug it” adage.
- steveklabnik 4y ago> why the rust crowd thinks manual memory management and zero cost abstractions are the only bullet points that matter. I don't think that's an accurate characterization of "the Rust crowd," but even if we do take it at face value, it would make sense: Rust was intended for the layer of the stack where these things do matter. Even though Rust has broken out of that initial layer, as the post demonstrates, culturally these things are likely to hold a bit more value than they may otherwise.
- DeathArrow 4y ago> Rust was intended for the layer of the stack where these things do matter. Good point. If those things don't matter, then maybe you are better off using another language.
- smolder 4y agoMemory management/performance are just among the most obvious points of comparison when looking at Rust versus other languages. Ergonomics come up too, though less often, and with less agreement on how good they are, since it's a pretty subjective judgement on a mixed bag of features and syntax.
- arch-ninja 4y agoGuarantees about those things are impossible to add after a language/community abandons them, and you can Arc::<RWLock<T>> your way to writing Java pretty fast. I hold that keeping the strongest-possible abstractions is the best decision, even if that means your average developer needs to learn borrow checking. I've started a career writing Java, spent a year with Rust, and when I came back to Java my data structures were 5x as useful. I could spit out features _WITHOUT_NULLPOINTER_ISSUES_ in hours where previously it would have taken a week. Yes there is a skill gradient, but everyone who doesn't climb that hill is a fool and a weaker team member for it in my opinion.
- cmrdporcupine 4y agoWell, because as others have pointed out, languages like that have existed for at least a couple decades. Most of the 'nice parts' of Rust are really borrowings from the ML family of languages: Hindley-Milner type inference, algebraic data types, and pattern matching. OCaml or StandardML, (or Haskell if you want to get funky ... I don't), F#, Scala, etc. Hell, these days even Swift, or Kotlin, have these features. Which I'd call: modern static type systems. And I understand even Java is getting some of them. Even TypeScript is a reasonable-ish solution with a pretty nifty type system, if you don't mind the (non-existent) threading model. I like Rust, but its niche is: the above nice things and a clean syntax, but without the latency&pause costs of GC. And that's what I use it for, when I need that kind of thing, for systems programming. And for that, the killer feature is the borrow checker which makes using the above features relatively painless, despite having no GC. (Now one other advantage of the borrow checker is its application to concurrency -- making ownership of locks, and mutable state generally, easier to reason about. That's perhaps a killer feature that the other languages I mentioned don't really have)
- tdeck 4y agoIt's often a good idea to focus on a narrower range of use cases when evaluating the tradeoffs involved in designing a system. In the case of Rust, it's designed for writing systems software in performance critical code paths where these bullet points matter.