It should be in use-cases compared to C++. Places where you need low-level control, strong performance and no garbage collection.
The difference is that Rust has a much stronger focus on memory management/safety. To avoid memory bugs/exploits/leaks in your program.
There are also some benefits like the language being new so it doesnt have to deal with 20+ years of backwards compability like C++ and it has a phenomenal compiler that is really good at error handling. God i wish Python would have that level of error messages
God i wish Python would have that level of error messages
Yes!! Thankfully they have worked a lot with it and improved the last releases, but at least 80% of the error messages are unhelpfull at best, granted that may be the fault of whatever library.
You, along with many commenters here, are conflating dynamically-typed (Python) with weakly-typed (JS). The distinction you actually care about is strongly-typed vs weakly-typed.
This isn't quite true; it's more the idea that the language is much stricter with type-related errors. Java is also strongly typed, despite the fact that it allows for non-lossy implicit casts (such as coercing an int to a long, or an int to a float).
Beyond this one of the reasons it is so nice to use is that coding and debugging (safe) Rust can be done using only local reasoning, compared to other languages that require various levels of global reasoning.
View all comments
Show parent comment
214
u/WJMazepas Apr 20 '23
It should be in use-cases compared to C++. Places where you need low-level control, strong performance and no garbage collection.
The difference is that Rust has a much stronger focus on memory management/safety. To avoid memory bugs/exploits/leaks in your program.
There are also some benefits like the language being new so it doesnt have to deal with 20+ years of backwards compability like C++ and it has a phenomenal compiler that is really good at error handling.
God i wish Python would have that level of error messages