Hacker News new | ask | show | jobs
by WoodenChair 3155 days ago
This sounds to me like "we will make it simpler by adding more features (that are presumably simpler to reason about)." The problem with C++ (and the reason that it is too complex) is that it has too many features. This proposal will do nothing to eliminate all of the cruft, the real source of complexity. That would require actually removing features, backwards-compatibility be damned!
3 comments

Looking at this post https://news.ycombinator.com/item?id=15613848, I wonder if it could help to simplify C++ by moving some of the existing features into libraries, which you would have to include for backwards compatibility, but could do without if you didn't need backwards compatibility.
Backwards compatibility in C++ means "your existing code still compiles and does the same thing". Can you give an example of a situation where that could be achieved with your proposal?
Well, my thought was that you'd just have different profiles, like is already used:

    -std=c++20-full
or

    -std=c++20-light
Perhaps c++20-light could never become the default, since it would break backwards compatibility, but you could always set the flag.

I dunno. It was just a thought I had when reading about the new feature, not something I've thought through.

C++ has many problems. A too complicated language is the least important of those because the newer features are significantly easier to use and read.

Headers suck. Build systems suck. Package management sucks. Compile times suck.

Precisely the things that are not part of the language are those that suck the most.

I rarely see anyone present well thought out specifics of what should be removed from the language when making these types of claim. There are some complex areas (two phase name lookup springs to mind) that might be done differently if designed anew but I haven't seen too many good examples of things that could be "easily" removed, backwards compatibility be damned, that I have found to be actual problems in practice. The best examples are usually legacies of C.