this post was submitted on 19 Jul 2024
10 points (100.0% liked)

C++

1763 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS
top 10 comments
sorted by: hot top controversial new old
[–] cmeerw@programming.dev 2 points 3 months ago

No mention of Reflection which was passed to the Core Working Group for wording review, or senders/receivers (on the library side) which was actually voted into the working paper.

[–] Bye@lemmy.world 2 points 3 months ago (1 children)

Wake me when they add named arguments.

[–] lysdexic@programming.dev 3 points 3 months ago (1 children)

named arguments

Is this supposed to be a critical feature?

[–] Bye@lemmy.world 2 points 3 months ago

It’s about the only thing I miss when I use cpp. Makes code far more legible.

[–] Moah@lemmy.blahaj.zone 2 points 3 months ago (2 children)

It would eliminate a billion bugs in all the code I’ve ever worked on. It’s sad.

[–] lysdexic@programming.dev 0 points 3 months ago* (last edited 3 months ago) (2 children)

Still no contracts?

In line with the release process for C++ standard specifications, where standards ship every 3 years but alternate between accepting new features and feature freeze releases, C++23 was the last release that was open to new features. This would mean C++26 is a feature freeze release following the new features introduced in C++23.

[–] Moah@lemmy.blahaj.zone 3 points 3 months ago (1 children)

Contacts have been talked about since C++11 so it's kinda sad that in 15 years they haven't managed to get them done.

[–] lysdexic@programming.dev 0 points 3 months ago

That's perfectly fine. It's a standardization process. Its goal is to set in stone a specification that everyone agrees to. Everything needs to line up.

In the meantime, some compiler vendors provide their own contracts support. If you feel this is a mandatory feature, nothing prevents you from using vendor-specific implementations. For example, GCC has support for contracts since at least 2022, and it's mostly in line with the stuff discussed in the standardization meetings.

[–] cmeerw@programming.dev 1 points 3 months ago

Huh? There is no such alternation between new features and feature freeze releases. In fact, C++26 will very likely get reflection as a major new feature. In comparison, the biggest core language feature in C++23 was probably "deducting this (explicit object member functions)".

The only thing that keeps Contracts out of C++26 is that they might not be finished in time (they'll need to be handed over from Evolution to Core by the February 2025 meeting, and then make it through Core review during the summer 2025 meeting).