Re:Modern C++ for C Programmers
by 29athrowaway on Tuesday April 30, 2019 @08:34PM
(#19793427)
If you are not already using C++, learn Rust instead.
[ Parent
| on HN ]
Coincidentally, the author already has a response for you: https://ds9a.nl/articles/posts/cpp-rust-go/
This post makes the mistake of assuming that anybody in industry writes secure C or C++ code.
Re:Modern C++ for C Programmers
by 29athrowaway on Tuesday April 30, 2019 @10:10PM
(#19793924)
- Rust doesn't have to keep 30+ years of backwards compatibility. You can learn it.
- C++ has hundreds of dialects to pick from. You'll spend time bikeshedding with coding standards, you'll spend time in meetings trying to get people to agree to a standard, you'll spend time trying to enforce the standard...
- Rust makes reasonable decisions by default, and mutable/unsafe code is opt-in.
Why learn Rust over C++?
Well, my answer is this: Coming from the perspective on a Pythonista, C++ seems tedious and error-prone. Rust, on the other hand, is merely tedious -- which is progress of a sort, one has to admit.
Coincidentally, I personally started learning Rust as C++ was a lot more difficult to learn by myself. The Rust book[1] is a great resource as it makes learning pretty complex topics fairly easy to approach.
Personally the thing that really sold me over was the "Building a guessing game" section, as it showed how to use the build system to pull in external libraries. I found these aspects specifically difficult to learn when learning C++. Plus, after learning Rust, I was able to go back to C++ and better understand it. Still have no clue about build systems though.
Re:Modern C++ for C Programmers
by lone_haxx0r on Tuesday April 30, 2019 @08:53PM
(#19793528)
And be treated badly by the Rust community for not agreeing with their political opinions.