Episode 150: Is C++ Dying? #41
Replies: 5 comments 8 replies
-
Thanks for this episode. As a hobbyist C++ programmer, it is sad that C++ is being criticized by many and should be avoided in new projects by US government agencies and other organizations. Here's my observations from social media: The recent memory safety issue was a wake-up call. Some people still ignore it saying nothing new. Most C++ developers complain about C++ but they have no choice but to use it. The ISO three year train model is outdated. Some people say that C++ will be replaced by some languages and fossilized. In the current situation, it seems to be a matter of time: younger generations become senior engineers and managers, and C++ would be in a legacy mode. If Rust were designed to interoperate with C++ from the beginning, its adoption would be widespread. There are too many C++ libraries out there. How can people switch to new languages every time better ones emerge? The Circle language showed that C++ can be improved and fixed but it remains to be solved how to deal with the Committee and fellow programmers. Personally, it is frustrating that the following code compiles. The address sanitizer can catch it though. #include <vector>
int main()
{
std::vector<int> vi{1, 2, 3};
for (auto& x : vi)
{
vi.push_back(++x);
}
} |
Beta Was this translation helpful? Give feedback.
-
My dudes, I'm a weird C++20/23 language nerd who also writes a bunch of C17 (and now some C23), and am a contributor the Sega Dreamcast indie SDK (which is shipping commercial games). Our scene has become hugely involved in supporting all of the modern C++ stdlib stuff and concurrency and all that, we are also now supporting the D programming language, and we are some of the earliest testers and users of the GCC-RS upcoming Rust front end for the GCC compiler... Sounds like I'm a dinosaur, but I have a weird passion for marrying the old with the new, so it's not like I'm some C89 guy. lmao. But I do think a lot of the criticism against C++ is unfounded. I have nothing against Rust, and some of the Rust guys are great friends of mine whose work I very much support, but I have some pretty hot takes and maintain a whole list of things I keep discovering that are literally not possible in the Rust language but are in C++... and I think that's important and nobody talks about it. Nobody is talking about the advanced features in C++ that Rust has no equivalent for like variadic templates, emplacement on containers, generic specializations, placement new/delete, inner structs/classes/types, generic closures, (dare I say) inheritance, etc... If you guys ever wanna shoot the shit and talk about supporting the latest features on retro hardware with a dude who has a bit of a C++ bias but is still familiar with the other languages, hit me up! This is fantastic content. EDIT: LOL. Also of the opinion Sean Baxter and Circle represent the future. lmao. PS: I was at Nvidia too doing tools for the Nintendo Switch Console. Small world! lol. |
Beta Was this translation helpful? Give feedback.
-
At 42:45 or so, Bryce talks about the next generation of leadership having diversity and inclusion in common, and Connor asks if [bleep] is in that boat (yes; surprise). Leaving aside American politics, which I definitely don't want to wade into, I don't understand what you mean in this discussion. What exactly does the next gen have in common? A set of ideas or practices? Do Connor and Bryce view this as a good thing or a bad thing for the improvement of the committee? How does it materially or practically affect the future of C++? If the major problem is sclerosis and inefficiency, what part does whatever they're talking about play in resolving (or worsening??) that? What would be different if "Baxter for Dictator" or one of Bryce's other reforms were to stick, or if the reigns were just handed over to this new gen? |
Beta Was this translation helpful? Give feedback.
-
I'm not convinced the language stagnating is necessarily an issue. We can still get some awesome libraries in the meantime. I think standardising a package manager and build-system is more important. Take a look at python. You can have a library with 50 dependencies specified in a requirements file. No problem, everything works and no sweats. C++ project with QT and boost and things get complicated. |
Beta Was this translation helpful? Give feedback.
-
In my view, the compiler should still be doing a lot more for the programmer. I don't think msvc is very good - haven't used the others much. But it's all there is and so one may think it's great. But it's really quite bad. The error messages alone are a complete disgrace and often utterly useless. Saying the problem is inside the STL in construct_at ... oh boy. If C++ compilers were great would we have Carbon or even Rust, etc.? Now the Circle compiler is nice in theory. But it's a one man closed-source show, but more like a local theater. Unless Baxter creates a business out of it, but does he want that? He doesn't open source either, so it's not clear what he wants (other than to have fun programming of course). But even as a proprietary compiler, would it sell? Maybe partnering with JetBrains is an option for him. Also circle is not cross platform. Which is a pretty big disappointment and likely he can't solve it by himself. Still Circle looks attractive. Because it's not a new language. But what is it? It's vendor-specific extensions to the standard. New exciting features, user-friendly metaprogramming, customer focused, delivered rather quickly. You don't need to learn a new language, but the extensions still make it feel like it's a new language. So you can gradually switch to this. Bjarne speaks about making the language bigger, more and better abstractions and never taking away something. So there you have it. Sean shows it's possible. But the standardization committee is a much more conservative and slow moving organization. The perceived attitude is "should we" rather than "how do we". So maybe we arrive at circle-like features in about 15 to 20 years 🤷 But anyway, on the other side isn't vendor-specific extension a thing of the past? Aren't we glad that there is a standard and not compiler-silos? (especially since circle isn't even cross platform). Only the circle compiler can parse circle extensions. So if you have to include a library that is written in circle in an ordinary C++ environment, how do you do it? Binary is not an option, because of header files, because of platforms. So without going either open source or going business circle isn't really a serious thing. The ISO C++ process, as painful as it may be, is the only thing going forward with C++. Circle may evolve into its own thing. |
Beta Was this translation helpful? Give feedback.
-
Episode Link: https://adspthepodcast.com/2023/10/06/Episode-150.html
Feel free to write comments or ask questions 🙂
Beta Was this translation helpful? Give feedback.
All reactions