To followup on the meeting - I would like to start a discussion on having two different visions of same library. I would like to advocate for keeping two versions of the same library (only in case the two versions are different due to changes applied with papers, of course)
Let’s take as an example: std::optional (was accepted in C++17)
First usecase:
- Assuming we accept a new paper for c++26, std::optional t will have extended API (allowing T&) for C++26 (due to: “P2988: std::optional<T&>”)
- At the point of acceptance - and before C++26 standard is closed (which may take up to 3 years according to latest C++ “train” model)
Question becomes: Do we want to provide both the latest approved version - C++23 (== C++17), AND the C++26 version.
A slightly different usecase:
- Let’s say we have a stable feature - containers (on 23)
- Now there’s a new C++26 paper: “P3372R2: constexpr containers and adapters” which doesn’t modify API but (potentially) modify the behaviour.
Third usecase:
- Say a paper P1234 proposng a “fix” for std::optional C++23 was accepted during C++26 cycle, which was not yet implemented on any official C++ standard lib distro (as, among other things, purpose of the project is to implement things before they make it to the standard)
- This will create a C++23 std::optioal, which is not the same one in the released standard lib versions.
In all cases, I think we’ll gain from maintaining two parallel versions of the source lib (std::optional, in this case) - if any diversion as in the above happens. I think it should be up to two versions - the latest standard released, and the one currently under development (e.g. now it will be C++23, C++26). So - taking above as an example - it will be std::optional 23 with the fix in P1234, and std::optional 26 with <T&> and the constexpr changes under development.
Main reasons as I see them:
- We have a reference for comparison for banchmarks and API
- We have a “stable” version (the one from previous cycle), which still have latest fixes not yet implemented in major standard lib releases.
(meeting attendees: @neatudarius @dsankel @Jeff-Garland @dietmarkuehl @river @RaduNichita)
Happy for input from all, of course!
WDYT?