top | item 44000358

(no title)

e-dant | 9 months ago

Let the language die, hope it goes quicker than cobol.

discuss

order

trealira|9 months ago

C++ is not going anywhere. It's even still used in gamedev to make new games. It's used in HPC and scientific computing. Windows applications often use it. And so on.

jandrewrogers|9 months ago

For better or worse, modern C++ is still the most capable and expressive systems language. To replace it, we need (at a minimum) a language with similar capability and expressiveness in the low-level systems domain. The options are really thin; Zig probably comes the closest but it is a bit austere coming from recent C++ versions.

I think we can do significantly better than C++ as a systems language. We just haven’t landed on a language that really nails the design.

johnnyjeans|9 months ago

> For better or worse, modern C++ is still the most capable and expressive systems language.

Not really. Rust, ATS, D, and some implementations of Lisp and even Haskell if you slay the dragon of actually learning GHC. Modern C++ is honestly overrated in my opinion as an extensive user of the language with 300k lines in a modern dialect alone. It's a pain in the ass to step through in a visual debugger and core dumps may as well be useless no matter the platform. It's extremely grating to read and to write. Compilers have a tendency to crash like crazy if you get too cute. There's still no compile-time (or runtime) reflection. I would literally rather be writing proofs for a dependent type system than deal with heavy template metaprogramming.

bdangubic|9 months ago

“quicker than cobol” means it will die in the next 100 years (maybe) :)

greesil|9 months ago

I don't think it's going anywhere, too much existing code that's still useful. People STILL use Fortran 77 for goodness sake.

lblume|9 months ago

Fortran may still be used but is considered functionally dead nonetheless. Nobody is hiring Fortran devs anymore (and those who do put themselves in a really hard market position). Yet, learning C++ might still be a more valuable skill than learning Rust.

gosub100|9 months ago

COBOL is alive and well. Why would a company rewrite a codebase that has decades of error free functionality? What do they get?

cheema33|9 months ago

> Why would a company rewrite a codebase that has decades of error free functionality? What do they get?

All well and good if it is something you do not have to modify/maintain on a regular basis. But, if you do, then the ROI on replacing it might be high, depending on how much pain it is to keep maintaining it.

We have an old web app written in asp.net web forms. It mostly works. But we have to maintain it and add functionality to it. And that is where the pain is. We've been doing it for a few years but the amount of pain it is to work on it is quite high. So we are slowly replacing it. One page at a time.

pjmlp|9 months ago

First someone needs to rewrite famous open source compiler development tools like GCC and LLVM into something else.

indigoabstract|9 months ago

I think this saying applies here pretty well: Horses don't die when the dogs want them to.

jimbob45|9 months ago

I suspect the committee agrees with you. I think they’ve anticipated a competitor coming to kill C++ for two decades now and see themselves as keeping C++ on life support for those who need it.

It’s shameful that there’s no good successor to C++ outside of C# and Java (and those really aren’t successors). Carbon was the closest we came and Google seems to have preemptively dropped it.

jhasse|9 months ago

Carbon doesn't have exceptions which makes it DOA for some.

I think Cpp2 / cppfront will become the successor language instead.

compiler-guy|9 months ago

Carbon is still quite active.