Hacker News new | ask | show | jobs
by jimbob45 1170 days ago
I haven't come across problems in years that were CPU bound/where I needed something like Rust

This is where Rust falls short of C#: scaling to the issue at hand. C# can build you a beautiful app at a high-level but also lets you dick with pointers and assembly at a low level. Rust insists on defaulting to pass-by-move and an arcane trait system that hold it back from being usable in large projects.

2 comments

If Rust had gone for a traditional OOP system, the "everything must be OOP/use inheritance everywhere" crew would have messed up the ecosystem pretty quickly. The traits concept is refreshing and traits + structs encourage composition over inheritance. I think it has been a huge plus for the language and the ecosystem.
I really like the trait system, but “refreshing” might not be the correct word given that it is pretty much what Haskell had for I don’t even know how many years.
Composition is objectively superior to inheritance, and that's all traits are: https://en.m.wikipedia.org/wiki/Composition_over_inheritance