3 ms·
I wrote a blog post showing how Rust performance can be pretty terrible when you write code like you would in other languages (something people recommend to beg
by brabel 5y ago
I wrote a blog post showing how Rust performance can be pretty terrible when you write code like you would in other languages (something people recommend to beginners to avoid having to deal with advanced concepts in Rust)... big mistake: I am pretty sure several dozen "Rustaceans" felt the need to write to me explaining how terrible my code was, how it could be much faster if I just did x and y (which were true, but beyond the point I was trying to make), how I didn't know even basic CompSci (well, I do, I managed to get a degree and work in this field for nearly two decades, but I disgress)... it was a pretty harsh experience, and I am now much more conservative with talking about my Rust code publicly as a result!
- alpaca128 5y agoIt's a double-edged sword. Rust gives all the tools to make really performant software and tries to keep inefficient operations visible. But in many situations doing it the "proper" way requires a deep understanding of the type system and a lot of experience so you can tell the compiler what you're trying to do. Most things just aren't performance critical enough to warrant a day of experimentation, and many features don't really need generics and all the syntax overhead that comes with them. When you combine that with perfectionists it can probably get annoying. It's sad this is common enough to drive people away, because I think Rust is a great language and using it "well enough" is the first step to learning how to do it better. Imho it's not realistic to expect everyone to really understand all aspects of traits, lifetimes etc. because those can get really tricky really quick and not every behaviour of the compiler is consistent in those areas.
- rob74 5y agoI don't have any first-hand experience with this topic, but it seems reasonable that Rust has a special attraction for perfectionists. So many features to play with to get the most efficient, memory-safe etc. code...
- cryptoboy2283 5y agoCould you share the link to your blog post?
- brabel 5y agoAre you joking? Do you want to join the angry crowd?
- cryptoboy2283 5y agoNope, currently learning Rust, really would love to read the articles about best practices & hidden costs
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]