3 ms·
Learn C++. You will have the opportunity to learn low-level features but know how to wrap them up inside highly performant, high-level components. Rust is inte
by jbandela1 11y ago
Learn C++. You will have the opportunity to learn low-level features but know how to wrap them up inside highly performant, high-level components.
Rust is interesting, but I think it will remain an interesting language outside the mainstream without any major commercial backers (Mozilla does not count). In addition, C++ is taking a lot of the ideas from Rust and incorporating them along with tooling that will provide 95+% of the value of Rust while still keeping the advantages of C++ (see https://www.youtube.com/watch?v=hEx5DNLWGgA https://www.youtube.com/watch?v=hEx5DNLWGgA)
What is interesting with C++ is that although a lot of vendors are pushing their own languages - Microsoft with C#, Apple with Swift, Google with Go, Facebook with Hack, Mozilla with Rust - they are all deeply involved with C++ because C++ powers their mission-critical code. Another way of putting it would be that despite all the promotion if all of Mozilla's Rust code were eliminated tomorrow nobody would notice, but if all of Mozilla's C++ code were eliminated, it would cease to exist.
Also, C++ is rapidly evolving and by learning Modern C++ 14 now, you can avoid a lot of the mistakes of C++ that were common in the past and write safe, elegant code. C++ is also experiencing a renaissance (see https://www.jetbrains.com/cpp/cpp-today-oreilly/ https://www.jetbrains.com/cpp/cpp-today-oreilly/). C++ is now the one high-level language that is natively supported by the system vendor across Windows, Linux, Mac, iOS, Android, Windows Phone, XBox, and Playstation.
- seren 11y agoI agree about the universality of C++. I also agree you have to compare C++ + code analysis versus Rust regarding safety. However, my team is spending over 100k$ a year to get access to these tools. In the grand scheme of things, compared to the salary and other expenses, it is insignificant. But for a small team for a new project, it is probably easier and more cost-effective to use a language that is safe from the ground up, rather than relying on external vendors. (Most of these tools have a free option for FLOSS projects, but you might need to develop something closed source) I honestly don't know if this is something that can tip the balance, or if this is a "detail". Time will tell.
- jbandela1 11y agoTake a look at Herb Sutter's talk from CppCon 2015. The slides are here (https://github.com/CppCon/CppCon2015/blob/master/Keynotes/Writing%20Good%20C++14%20By%20Default/Writing%20Good%20C++14%20By%20Default%20-%20Herb%20Sutter%20-%20CppCon%202015.pdf https://github.com/CppCon/CppCon2015/blob/master/Keynotes/Wr...) and the video is here https://www.youtube.com/watch?v=hEx5DNLWGgA https://www.youtube.com/watch?v=hEx5DNLWGgA. Microsoft will be releasing the static analysis tool as a free cross-platform tool (and I think open-source IIRC). They shipped a preview for Visual Studio 2015 with Update 1, and are planning on shipping a cross-platform version soon. As tools like this become free and ubiquitous, it will greatly improve C++ code safety.