Live data from Hacker News

The Two Factions of C++ (2024)

herecomesthemoon.net

41–50 of 89 posts

Re: The Two Factions of C++ (2024)

#41

In 2026, there really needs to be a REALLY good reason for people to use C++ for greenfield projects over using something like Rust, Go or C#. I mean, I've made it work, but that pretty much involves making a completely new build system AND test framework from scratch because C++ tooling is just that bad, because I swear I spent 2 days trying to setup CMake to get Skyrim modding setup, and in the end, I had to tap ou…

> There is a good language buried underneath C++ somewhere, it's just that nobody has taken the time to extract it. Carbon?

Carbon isn't even a real language, no real language will spent 4 entire years and is still stuck in version 0.0.0-0. It feels more like bad Rust than a proper C++ successor at all.

Just to give you a small example? why would a C++ successor language use `fn main()` instead of using C/C++ style `int main()`? And their generics system is even more confusing, are they going to support a new form of generics or are they sticking with templates? And if they are going to add templates, why would they not add pretty much one of the best additions to modern C++ to Carbon, concepts?

Re: The Two Factions of C++ (2024)

#42

In 2026, there really needs to be a REALLY good reason for people to use C++ for greenfield projects over using something like Rust, Go or C#. I mean, I've made it work, but that pretty much involves making a completely new build system AND test framework from scratch because C++ tooling is just that bad, because I swear I spent 2 days trying to setup CMake to get Skyrim modding setup, and in the end, I had to tap ou…

> There is a good language buried underneath C++ somewhere, it's just that nobody has taken the time to extract it. Carbon?

No, it's C :) And for me that's not even a hot take anymore, I switched back to C (specifically C99 and later) around 2017 after nearly 20 years of C++ as my main language, and I don't miss C++ the slightest. The hardest part was unlearning some bad C++ habits. The other 'behaviour change' for me was to open my mind to more programming languages. E.g. instead of trying to solve every problem with C++ I now pick a language that better matches the problem I want to solve (e.g. on one end of my language toolbox is C, on the other extreme end is Typescript, and somewhere in the middle are Zig, on Mac of course the occasional ObjC (not a fan of Swift tbh), and yes, sometimes even still modern C++ - in the end, the choice of language is mostly driven by the dependencies you need to use).

Re: The Two Factions of C++ (2024)

#43

In 2026, there really needs to be a REALLY good reason for people to use C++ for greenfield projects over using something like Rust, Go or C#. I mean, I've made it work, but that pretty much involves making a completely new build system AND test framework from scratch because C++ tooling is just that bad, because I swear I spent 2 days trying to setup CMake to get Skyrim modding setup, and in the end, I had to tap ou…

> There is a good language buried underneath C++ somewhere Well.. "C".. though I wouldn't go so far as to call that a good language, either.

Lack of support for type-safe containers (need to be hack toghether via macros) and overreliance on macros in general (which are not IDE and debugger friendly) are two aspects of C that are off-putting for majority of people in 2026. That's even assuming you're willing to forego pointer/memory safety.

Re: The Two Factions of C++ (2024)

#44

Earlier quoted context omitted.

> There is a good language buried underneath C++ somewhere, it's just that nobody has taken the time to extract it. Carbon?

Carbon isn't even a real language, no real language will spent 4 entire years and is still stuck in version 0.0.0-0. It feels more like bad Rust than a proper C++ successor at all. Just to give you a small example? why would a C++ successor language use `fn main()` instead of using C/C++ style `int main()`? And their generics system is even more confusing, are they going to support a new form of generics or are they…

> why would a C++ successor language use `fn main()` instead of using C/C++ style `int main()`

Apparently easier and faster parsing. Most modern language have arrived at the `fn bla(arg: ArgType): ResultType` form and I don't think they made that decision for purely aesthetical reasons.

Re: The Two Factions of C++ (2024)

#45
I was deeply saddened by the vote the article refers to that effectively excluded Sean Baxter's Safe C++. It felt like a push that prevented tabling the solution at all. If Safe C++ had been debated on its merits, that would be one thing, but this seemed (to me) to prevent ever getting to that point. Who knows if that was the intent: the result is what disappointed me.

In my view, one of the major compiler vendors needs to take on Safe C++ and start supporting it... with refactoring tooling to get a codebase there. Because as this article says, tooling is key.

Re: The Two Factions of C++ (2024)

#46
post #38
post #31

Earlier quoted context omitted.

When they inverse the priority, there are little reason to keep on using C++.

What seems to be happening today is that outside specific domains like HFT, games, embedded systems or stuff like CUDA where C/C++ is the king, nobody wants to write new code in C/C++ or at least starting new projects in the language, while fervently migrating safety critical code to Rust. Even in those domains there are efforts to do things in Rust, although it's unclear when Rust is going to be an actually serious/…

[deleted]

Re: The Two Factions of C++ (2024)

#47

In 2026, there really needs to be a REALLY good reason for people to use C++ for greenfield projects over using something like Rust, Go or C#. I mean, I've made it work, but that pretty much involves making a completely new build system AND test framework from scratch because C++ tooling is just that bad, because I swear I spent 2 days trying to setup CMake to get Skyrim modding setup, and in the end, I had to tap ou…

    > involves making a completely new build system AND test framework from scratch because C++ tooling is just that bad
In 2026, CMake is the standard build tool, and Google Test is usually a safe choice. There are many example projects on GitHub to learn how to use them.

Re: The Two Factions of C++ (2024)

#48

Earlier quoted context omitted.

Carbon isn't even a real language, no real language will spent 4 entire years and is still stuck in version 0.0.0-0. It feels more like bad Rust than a proper C++ successor at all. Just to give you a small example? why would a C++ successor language use `fn main()` instead of using C/C++ style `int main()`? And their generics system is even more confusing, are they going to support a new form of generics or are they…

> why would a C++ successor language use `fn main()` instead of using C/C++ style `int main()` Apparently easier and faster parsing. Most modern language have arrived at the `fn bla(arg: ArgType): ResultType` form and I don't think they made that decision for purely aesthetical reasons.

Even C++ has. https://www.geeksforgeeks.org/cpp/trailing-return-type-in-cp...

Re: The Two Factions of C++ (2024)

#49
post #43

Earlier quoted context omitted.

> There is a good language buried underneath C++ somewhere Well.. "C".. though I wouldn't go so far as to call that a good language, either.

Lack of support for type-safe containers (need to be hack toghether via macros) and overreliance on macros in general (which are not IDE and debugger friendly) are two aspects of C that are off-putting for majority of people in 2026. That's even assuming you're willing to forego pointer/memory safety.

Indeed, picking C doesn't make sense when you actually want to write C++ code in C ;)

Re: The Two Factions of C++ (2024)

#50

In 2026, there really needs to be a REALLY good reason for people to use C++ for greenfield projects over using something like Rust, Go or C#. I mean, I've made it work, but that pretty much involves making a completely new build system AND test framework from scratch because C++ tooling is just that bad, because I swear I spent 2 days trying to setup CMake to get Skyrim modding setup, and in the end, I had to tap ou…

> There is a good language buried underneath C++ somewhere Well.. "C".. though I wouldn't go so far as to call that a good language, either.

Well, Carbon would have been better off if they just made "C with `match` and sane error handling" instead of whatever it is they are building there over at Google. But still, I think C and C++ are honestly very different languages at this point and that you can't really call C++ a superset of C at all really.
Post reply on HN