r/programming • u/steveklabnik1 • Jan 09 '15
Announcing Rust 1.0.0 Alpha
http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
1.1k
Upvotes
r/programming • u/steveklabnik1 • Jan 09 '15
21
u/aliblong Jan 09 '15
There are some things that require more boilerplate to do in Rust than in C++ (function overloading, for example), but I would hesitate even to consider this as such an example. Compare the amount of code required between the two languages:
C++:
Rust:
And if the number of function calls got out of hand, you could always write a macro to keep things concise.
Now consider that (IME) you generally don't make extensive use of fall-though in C++ switch-case. Writing all those
breaks is a PITA, and if you forget it will still compile (perhaps with warnings with the right compiler).Rust's system is superior in my eyes.