4 ms·
> 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 int
by dleslie 7y ago
> 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#.
- Someone 7y agoAnd that wasn’t because it had better C interop?
- jeltz 7y agoNo, while C interop was useful it was mostly because it was easier to write low latency code in C++.
- frabert 7y agoI don't really buy into the fact that enterprise apps are written in C++ because gamedev uses it
- pjmlp 7y agoVery bad example. 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).
- davedx 7y agoI 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.
- pjmlp 7y agoMy 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.
- davedx 7y agoThe 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.
- pjmlp 7y agoI am not saying it hasn't contributed, rather that it hasn't been a critical factor to keep C++ around, the OS SDKs have been it. Had Apple, Microsoft, Google decided otherwise and game community opinions wouldn't matter.
- dleslie 7y ago> game community opinions wouldn't matter. 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. Worth watching: https://www.youtube.com/watch?v=qYN6eduU06s https://www.youtube.com/watch?v=qYN6eduU06s 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.
- davedx 7y agoAlso 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...
- pjmlp 7y agoNot 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.
- FpUser 7y ago"It's hard to believe how fast things changed and desktop apps were replaced by web apps.." Mostly business type front ends and it actually mostly makes sense for that purpose. But there are huge areas where browsers play no role.
- ufmace 7y agoI 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.
- skissane 7y agoWhy 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.)
- pjmlp 7y agoGraalVM is taking care of that part, specially with Project Metropolis.
- why_only_15 7y agoThere 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
- skissane 7y agoI 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.
- neurocline 7y agoThere are around 5 million C++ developers.