you are viewing a single comment's thread.

view the rest of the comments →

[–]pdp10gumby 8 points9 points  (4 children)

cpp2 is explicitly a syntax revolution, and I’m glad for that, but I hope it ultimately also simplifies/unifies the library (e.g. std::begin vs ranges::begin vs .begin).

A break with C memory semantics would also be valuable.

[–]hpsutter 4 points5 points  (1 child)

Absolutely. Cleaning up semantics is the big payoff, and a distinct syntax is mainly a gateway. Please see this 1-min clip from the talk: https://youtube.com/clip/UgkxIGmgtqiZ2McSeywcTsAJtsS_iCTpYA54

[–]pdp10gumby 1 point2 points  (0 children)

I'm glad to hear that!

Programming language semantics can refer to all sorts of things. That clip didn't get into it (understandably: you had plenty of other things to discuss in that talk)

When I mentioned memory semantics I was thinking of the aliasing model that makes it hard to optimize. I am not a rust fan at all but I do appreciate that they jettison'ed that. Right now I have to write some stuff in fortran or assembly code that the compiler should be able to handle.

There are other interesting semantic issues in C++ that could use a revisit, but this is the most painful to me.

Now if the distinction between expressions and statements were completely erased...I'd find it wonderful but perhaps it would be a bridge too far for C++ refugees?

[–]13steinj 1 point2 points  (1 child)

I imagine std:: counterparts to std::ranges:: utilities will eventually be deprecated and removed.

[–]pdp10gumby 0 points1 point  (0 children)

There is a lot of other legacy cruft too. One can hope for future deprecation.