Hacker News new | ask | show | jobs
by mebassett 913 days ago
why would someone learn c++ in 2024, assuming one is not about to work on legacy projects? I'm about to start a quixotic new personal project and was considering using (read: learning) c++ for it, but it feels like rust is getting all the new attention. (and I'm already spoiled by haskell and racket.)
4 comments

Because interesting stuff is written in C and C++, far more than any other language in existence right now.

Compilers, games, all of the backends of the current LLM revolution, control systems for interesting hardware.

You would sabotage yourself if you choose not to learn how to use a possibly suboptimal tool that is an industry standard.

There are big parts of the industry where Rust still doesn't have much penetration, even for new projects. Games is a big example. Highly regulated, safety-critical code is another. I think Rust will eventually get there, but it'll be a while before it's a "boring" choice for these things.
You learn a new language to write programs in that language. Few want to pay you to code in Haskell, Rust, or Racket. It will be that way for a long, long time. In 2030 your list will be different, but people will still pay to have C++ code written. Your personal project might then turn out to be in what is considered a legacy language, as Ruby is now. But C++ will continue modernizing, and getting more pleasant to code in.
The state of programming languages on GPUs.