r/rust • u/rustacean1337 • Nov 17 '22
What are Rust’s biggest weaknesses?
What would you say are Rust’s biggest weaknesses right now? And are they things that can be fixed in future versions do you think or is it something that could only be fixed by introducing a breaking change? Let’s say if you could create a Rust 2.0 and therefore not worry about backwards compatibility what would you do different.
223
Upvotes
View all comments
Show parent comment
1
u/CocktailPerson Nov 19 '22
Eh, I'm just pointing out that type mismatches can be indicative of logic errors even if they're primitive types. And creating your own structs is fine if you control all the code you call and don't mind rewriting all the numerical traits to be able to add two
Meters, but that all seems a bit silly coming from someone who's trying to avoid having to typeas i64.Implicitly coercing types and then having to come back and profile your code to figure out where it's expensive seems like a premature pessimization when the compiler can just...make you explicitly annotate the coercion.