3 ms·
> I disagree. As others have pointed out, the demand for C++ jobs is still much higher than Rust jobs, so I think my answer still stands as a way to set yoursel
by pcwalton 11y ago
> I disagree. As others have pointed out, the demand for C++ jobs is still much higher than Rust jobs, so I think my answer still stands as a way to set yourself apart when thinking of a new language to spend a few months on.
It's not going to be a particularly interesting thread if everyone who works in a language that trends higher than Go on Google chimes in to say "you should learn my language instead, because it's more popular".
> Ideally, one would learn Rust and C++ both and see how they differ, and why.
Aside from uninteresting language-specific details, C++ essentially doesn't teach you anything that Rust doesn't.
- hellofunk 11y ago>It's not going to be a particularly interesting thread if everyone who works in a language that trends higher than Go on Google chimes in to say "you should learn my language instead, because it's more popular". I think C++ is unique in that it is really not as popular as many new languages, not as trendy and as much in the news, and not even taught as much in college programs, yet, it remains the language where so many jobs are. This gives anyone with the desire to learn it a good and marketable skill that can make it possibly easier to find work and continue making a living doing software development. That does not apply to Rust, so I think it's a fair point to make to anyone who is asking about what languages are good to learn. As for whether C++ has any techniques to teach that Rust does not, C++ is definitely a unique experience to go through and certainly gives a developer more insight into the actual machine they are working on in a way that few languages do.
- pcwalton 11y ago> it remains the language where so many jobs are "The" language where so many jobs are? It's one of many. > As for whether C++ has any techniques to teach that Rust does not, C++ is definitely a unique experience to go through and certainly gives a developer more insight into the actual machine they are working on in a way that few languages do. Can you name, specifically, a way in which C++ gives you "more insight into the actual machine" compared to Rust?
- hellofunk 11y agoI think that Rust simplifies some things that you must do yourself in C++, and learning how to do them is valuable. At the very least, it will help you appreciate other languages, but it can also show you areas where you get manual control over performance in ways no other language offers. And, perhaps most significantly, there are a wealth of C++ libraries out there that have no equivalent in other languages, and being able to use them is an education in itself.
- cjfont 11y agoIf my understanding is correct, you can use any of those C++ libraries from Rust as well.
- kibwen 11y agoIf those C++ libraries expose a C API, then yes.
- yoklov 11y agoAs someone who has written a lot of C++ (and essentially no rust), I think you're mischaracterizing C++. It has a lot of magic that the compiler does for you under the hood, and even more if you are using libraries. If you want to understand what is actually happening on the machine, I do not think it is the best choice. C would be much better.
- nickpsecurity 11y agoThe C++ programmers here disagree given how often they point out that C++ close to the machine is actually the C style of programming done with C++ language. It's actively discouraged by the C++ community in favor of the C++ style of programming described in Modern C++, etc. The C++ style gives low-overhead abstractions that increase safety and maintainability (in theory) while aiming for C compatibility and performance. Main libraries and well-written apps are big on metaprogrammed constructs. So, learning to code professional C++ will not help you understand machines more. You'd have to learn C, basic OS/CPU structures, and which compilers produce for certain C statements. Maybe read Write Great Code by Hyde or some online articles. Learn C++ to understand machines? Not happening unless you microprogram a CPU for it on a FPGA.
- neppo 11y agoOPs asked which language to learn from a career perspective, so C++ is good advice in that respect
- deleted 11y ago[deleted]
- fiedzia 11y agoWell, it may teach you why its a good idea to throw away old features every couple of decades :-)