• 0 Posts
  • 107 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle
  • What do you mean by its predecessor? C++? I think rust has a bunch of advantages. For one, designing a new language today gives you the benefit of hindsight meaning that they have a more cohesive set of features and a nicer standard library compared to C++ that has some bloat and cruft as a natural result of it evolving over several decades. It’s also much easier to reason about undefined behavior in rust thanks to unsafe. Algebraic data types are really nice and traits are better than classes.

    The borrow checker isn’t just useful for low level programming. One of the other main selling points is “fearless concurrency” or essentially the fact that the borrow checker can help you reason about thread safe vs non thread safe data.







  • If you’re hobby programming then do whatever you want obviously but if you’re part of some sort of larger project that’s trying to decide between Rust and C++ then subjective aesthetic arguments probably aren’t going to be considered as heavily as technical ones (and rightfully so), which in Rusts case could be that certain classes of bugs are impossible. That’s not to say that it’s not possible to make a technical case for C++ over rust but syntax preferences probably aren’t going to play a large role in how widely used either languages are, which is good.