> The interesting question isn’t “Why did Smalltalk die”, it’s “Why did C++ survive”. I think it’s because C++ had better C interop so was easier to extend into legacy systems.
Video Games. From around 1999 to recently, C++ was the language of game development. It only recently came under serious threat, from C#.
Video games community is very luddite in what concerns adoption of technologies, they usually only move forward when the platform owners force them to do so.
Many moons ago, C, Pascal, Modula-2, Basic were seen as Unity is seen nowadays, naturally real game devs had to use Assembly, specially to take care of the special purpose graphic and sprite engines.
Playstation 1 was probably the first console that force them to start using C instead, while on 16 bit.
So slowly everyone accepted that doing games in C, Pascal and what have wasn't that bad.
C++ only became kind of accepted years later, and even then it was more "C compiled with C++" than anything else.
The major boost for C++ were the OS vendors for home and office computers, Apple, IBM and Microsoft, alongside Zortech, Borland and Watcom, with their full stack C++ frameworks, something that ironically C++ has lost (OS C++ SDKs where it has the front role).
> Video games community is very luddite in what concerns adoption of technologies, they usually only move forward when the platform owners force them to do so.
I think this is an unfair assessment. "Real devs" had to use assembly language because when targeting consoles and low-end home computers, this was the only really performant option for a long time. For a lot of types of games this doesn't matter so much, but there's a long ongoing trend in big titles really trying to cram as much visual fidelity as possible into the target machine.
Same deal with C++ today. You can use Unity of course, no one is any less of a "real game dev" because of it, but it's simply not an option if you want to work on cutting edge tech for AAA titles. There are tons of other things you may want to work on, other boundaries to push, which I think is why Unity is such a popular option. But I think it's unfair to simply chalk it up to luddism. Present the available alternatives that compare favorably in terms of development speed and performance for non-critical software instead.
While it might feel unfair, I wasn't attacking anyone on purpose, it is based on experience, from my demoscene days, to the friends I got to meet in the industry, to my former past as IGDA member, and the ways I have kept in touch with the industry, even though I have decided that the boring corporate world with graphics programming as hobby, was something I rather spend my time on than the typical studio life.
While the demands of gaming industry have always driven the hardware evolution on mainstream computing, most studios only move to newer programing languages when the platform owners force them to do so.
The gaming industry is not known for being early adopters of new software stacks, and many studios would to this day actually use pure C instead of C++ if the console vendors would give them C based SDKs.
> While the demands of gaming industry have always driven the hardware evolution on mainstream computing, most studios only move to newer programing languages when the platform owners force them to do so.
My point is that it isn't a question of new vs old. It's a question of fast vs slow. There was a reluctance to adopt e.g. Pascal because the popular implementations favored convenience of implementation (UCSD Pascal, which generated code for a virtual machine) or speed of compilation (Turbo Pascal, a single pass compiler) over the quality of the generated code. For long, it was the case that C compilers generated code that couldn't nearly measure up with hand-written assembly.
I've seen plenty of old games and demos written in C and Pascal. Almost always using these languages as organization frameworks for executing snippets of in-line assembly where speed actually mattered.
So what are the alternatives to C++ today? A lot of game developers use Unity and write code in C#. Unity itself is of course written almost entirely in C++. Rust? Well, if you can figure out exactly when memory is freed, which Rust can make a bit of a puzzle. Zig seems like it could be a nice contender, at some point in the future. Swift? If you can accept the cost of reference counting.
All these are great options IMO, just perhaps not for the low-level work that goes on at the big high tech game studios. The closest thing to a contender is maybe Rust. The game industry's reluctance to adopt Rust is hardly unique to them.
I know several studios local to Vancouver that are making heavy use of Go, Swift or Rust. And of course, a few that are deep into HTML5. There are games being shipped written in mruby.
I'm not in agreement with your assessment that the industry is conservative; it is largely responsible for pushing graphics into programmable pipelines, for instance, and the vendor-preffered language lock-in for consoles hasn't really been a factor since the Indie revolution took the industry by storm.
I don't take indies into consideration on my remark, consoles and mobile OS is where the money is, and none of those languages have a place there currently, with exception of Swift on iOS.
I know for a fact that teams at EA are using such tech, as are teams at Microsoft and others.
Also, thumbing your nose at Indie games is odd, considering the sales they've enjoyed and the extent to which the industry has adjusted to adapt to their surge in popularity.
I can't imagine Nintendo in the 90s treating indie devs the way it treats them today.
Swift, Kotlin, Objective-C, Java are unavoidable when doing iOS and Android development, the OS features that are exposed to C and C++ aren'tt enough for doing a game.
I don't think it's a very bad example at all, it's just not the only reason C++ "didn't die out".
I worked as a C++ programmer from something like 2001 - 2010, and all video games companies used it. I wouldn't have learned how to program properly in it without the games experience I gained.
My introduction to C++, was Turbo C++ 1.0 for MS-DOS, in 1992.
Until 2001, you had Mac OS, Windows, OS/2, BeOS, EPOC, Telligent, ill fated Coplad, SOM, COM, CORBA, Newton all using C++ as the main programming language for enterprise applications.
The argument is why C++ hasn't died, and the video games industry has undoubtably contributed to its staying power. Most of the things you list have replaced C++ with other languages.
That's ludicrous. Because of game industry demand for programmable graphics pipelines we now have the modern AI industry. You're welcome.
Because of game industry demand for high-performance, low-latency programming languages C++ stuck around. You've scoffed that it's basically used as C-in-a-C++-compiler, but that's because the steering committee seems to be completely out of touch with what people want C++ to do.
Sure, game devs ignore modern C++ and the STL, but they do so because modern C++ and the STL, as defined, are not zero-cost abstractions. If we wanted a language with a predictable 30% overhead we'd use C#, and we do, but when it matters we want something where the core language is without serious burden in its use.
Why use C++ if zero-cost abstractions aren't important to you? Honestly, what's the value? You've already given up frames, you may as well accept some to handle memory management, continuous garbage collection, ownership safety and so on.
Programmable graphics pipelines were originally done at Pixar with Renderman, and used in Hollywood movies like Toy Story, definitly not a game related community.
Yes the games industry demand for better hardware has driven mainstream computing to adopt them.
And naturally we got shader Assembly, followed up by C dialects like Cg and 3DLabs initial GLSL implementation.
C++ on the GPUs happened thanks to CUDA and C++AMP.
Even Vulkan would keep being a bare bones C API if it wasn't for NVidia's initial use of C++ on their samples SDK.
Hardly any programming language innovation being done by gaming companies, with exception of snowflakes like Naughty Dog.
How is it a bad example of something which maintains the popularity of C++ when you acknowledge that C++ has been in use in the time period I mentioned, for that industry?
A few years after the Playstation gained prominence would be around 1999; and shortly thereafter Unreal Engine took the industry by storm.
EASTL is how old, now?
I still remember Carmack's comments of his initial forays into using C++ for idtech.
Also Visual C++ and Visual Studio. I worked on desktop software from around 2007-2010, not that long ago; all our software line was built in Visual C++ with MFC.
It's hard to believe how fast things changed and desktop apps were replaced by web apps...
Not everywhere, I am now back at doing Web related UIs, but have managed to keep doing desktop stuff every now and then.
There are domains, like laboratory automation devices in life sciences where browsers are persona non grata in air gaped environments, plus they lack the necessary hardware integration.
So between daemon + browser and a proper desktop application, most customers still rather have a nice desktop application.
I worked on Windows desktop apps around the same timeframe, maybe a bit later. IMO, C#/Winforms killed C++/MFC, due to being massively simpler and more productive, without giving up much in the way of performance.
Why did C++ survive the advent of Java? One reason: the mainstream JVM, HotSpot, is written in C++. As such, the production Java ecosystem is not self-hosting and relies on C++ to be sustained.
(Writing a JVM in just Java is doable, and some research JVMs have done it, but that approach hasn’t yet been fully productionised.)
There are probably >100,000 c++ devs out there, and ~100 of them work on HotSpot. I don't think the HotSpot devs are significant in encouraging c++ usage
I think it demonstrates the point - that if Java is not able to be fully self-hosting in practice, then there are significant gaps in its abilities – and those same gaps in its abilities that drove HotSpot devs to implement HotSpot itself in C++ instead of Java also drive other projects to choose C++ over Java.
Video Games. From around 1999 to recently, C++ was the language of game development. It only recently came under serious threat, from C#.