←back to thread

In Defense of C++

(dayvster.com)
185 points todsacerdoti | 8 comments | | HN request time: 0s | source | bottom
Show context
gmueckl ◴[] No.45268341[source]
C++ will always stay relevant. Software has eaten the world. That transition is almost complete now. The languages that were around when it happened will stay deeply embedded in our fundamental tech stacks for another couple decades at least, if not centuries. And C and C++ are the lion's share of that.

COBOL sticks around 66 years after its first release. Fortran is 68 years old and is still enormously relevant. Much, much more software was written in newer languages and has become so complex that replacements have become practically impossible (Fuchsia hasn't replaces Linux in Google products, wayland isn't ready to replace X11 etc)

replies(5): >>45268502 #>>45270041 #>>45271012 #>>45271079 #>>45271226 #
1. ktpsns ◴[] No.45268502[source]
As long as people write software (no pun intended), software will follow trends. For instance, in many scientific ecosystems, Matlab was successfully replaced by Scipy. Which happens to get replaced by Julia. Things don't neccessarily have to stay the same. Interestingly, such a generational trend currently happens with Rust, despite there has been numerous other popular languages such as D or Zig which didn't have the same traction.

Sure, there are still Fortran codes. But I can hardly imagine that Fortran still plays a big role in another 68 years from now on.

replies(5): >>45268869 #>>45270098 #>>45270944 #>>45271966 #>>45273443 #
2. gmueckl ◴[] No.45268869[source]
I am not saying that these languages will stay around forever, mind you. But we have solidified the tech stacks involving these languages by making them ridiculously complex. Replacement of a programming language in one of the core components can only come through gradual and glacially slow evolution at this point. "Rewrite it in XYZ" as a clean slate approach on a big scale is simply a pipe dream.

Re Matlab: I still see it thriving in the industry, for better or worse. Many engineers just seem to love it. I haven't seen many users of Julia yet. Where do you see those? I think that Julia deserves a fair chance, but it just doesn't have a presence in the fields I work in.

replies(1): >>45270900 #
3. binary132 ◴[] No.45270098[source]
You’re thinking of software that is being written today. GP is talking about software we use every day in every device on the planet that hasn’t changed since it was written 30+ years ago.
replies(1): >>45271378 #
4. ants_everywhere ◴[] No.45270900[source]
I've heard via former employees that Mathworks has conceded that Python ate Matlab's niche and that they're focusing on Simulink
5. klik99 ◴[] No.45270944[source]
Matlab/Scipy/Julia are totally different since those function more like user interfaces, they are directly user facing. You're not building an app with matlab (though you might be with scipy and julia, it's not the primary use case), you're working with data. C++ on the other hand underpins a lot of key infrastructure.
6. nine_k ◴[] No.45271378[source]
What is this software? E.g. Linux is 33 years old; barely a few percent of Linux 1.0 remains in a modern kernel, if we count lines of code.

Maybe GNU Emacs has a larger percentage remaining intact; at least it retains some architectural idiosyncrasies from 1980s.

As of Fortran, modern Fortran is a pretty nice and rich language, very unlike the Fortran-77 I wrote at high school.

7. vhcr ◴[] No.45271966[source]
Scipy is a wrapper of Numpy, which is a wrapper of C and Fortran.
8. wolvesechoes ◴[] No.45273443[source]
> For instance, in many scientific ecosystems, Matlab was successfully replaced by Scipy. Which happens to get replaced by Julia

If by scientific ecosystems you mean people making prototypes for papers, then yes. But in commercial, industrial setting there is still no alternative for many of Matlab toolboxes, and as for Julia, as cool as it is, you need to be careful to distinguish between real usage and vetted marketing materials created by JuliaSim.