Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2210 Superior String Splitting #912

Closed
wg21bot opened this issue Aug 23, 2020 · 11 comments · Fixed by cplusplus/draft#4684
Closed

P2210 Superior String Splitting #912

wg21bot opened this issue Aug 23, 2020 · 11 comments · Fixed by cplusplus/draft#4684
Labels
B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e C++23 Targeted at C++23 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. ranges std::ranges
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Aug 23, 2020

P2210R0 Superior String Splitting (Barry Revzin)

@wg21bot wg21bot added the LEWG Library Evolution label Aug 23, 2020
@wg21bot wg21bot added this to the 2020-telecon milestone Aug 23, 2020
@brycelelbach brycelelbach added B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e IS Ship vehicle: IS ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting labels Aug 25, 2020
@brycelelbach brycelelbach moved this from 2020-09-01 to 2020-09-08 in Library Evolution Telecons Sep 1, 2020
@brycelelbach brycelelbach moved this from 2020-09-08 to 2020-09-15 in Library Evolution Telecons Sep 1, 2020
@ben-craig ben-craig added the needs-revision Paper needs changes before it can proceed label Dec 16, 2020
@ben-craig
Copy link
Collaborator

P2210R0: Superior String Splitting

2020-12-14 Library Evolution Telecon Minutes

Chair: Ben Craig

Champion: Barry Revzin

Minute Taker: Inbal Levi

Start: 2020-12-14 08:05 Pacific Standard

POLL: We should promise more committee time to pursuing ranges string splitting, knowing that our time is scarce and this will leave less time for other work.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
8 9 3 0 0

Attendance: 26 (27 at the end)

# of Authors: 1

Author Position: SF

Outcome: Consensus to pursue

POLL: Attempt to push P2210 changes into the IS prior to implementers providing a working split_view (with that name). (This requires Barry to provide papers quickly).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
8 9 3 0 0

Attendance: 27

# of Authors: 1

Author Position: SF

Outcome: Barry should bring a paper back sooner rather than later.
End: 08:50

SUMMARY:
split_view's most important use case is for splitting strings, but the C++20 split_view is not currently well suited to that task.
The room is interested in fixing this use case. This would be a breaking change from C++20 in theory, but if the change happens quickly enough, then it won't be a breaking change in practice, as there aren't usable implementations in the wild.

OUTCOME: The author should return soon with a paper that has wording. The paper should discuss the tradeoffs between changing behavior vs. providing a new facility. Have an LWG wordsmith preview the wording so that it is suitable for forwarding / polling to forward.

@jensmaurer jensmaurer removed this from the 2020-telecon milestone Dec 27, 2020
@wg21bot
Copy link
Collaborator Author

wg21bot commented Jan 22, 2021

P2210R1 Superior String Splitting (Barry Revzin)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Jan 22, 2021
@wg21bot wg21bot added this to the 2021-telecon milestone Jan 22, 2021
@brycelelbach brycelelbach added the scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review label Jan 27, 2021
@Arcitec
Copy link

Arcitec commented Feb 4, 2021

I stumbled onto this topic after watching a 2017 lecture by Bjarne Stroustrup where he wishes C++ would have an easy way to split strings, like other languages. See https://www.youtube.com/watch?v=fX2W3nNjJIo at 1:12:20. He says that easy string splitting among other things are needed to give C++ broader appeal and a successful future for the next generation of programmers.

The current method with range views is anything but easy. Barry Revzin's proposal looks like a massive improvement. Thank you for all the heavy work involved in this. I sincerely hope a resolution is reached and the standard revised so that we get a usable string splitter in C++.

The revised proposal sounds good, which is to rename the less-useful current implementation to "lazy", and adding some variation of Revzin's improved code to the library instead. Preferably without any cruft related to the old, less-useful lazy version. A new, efficient revision of the entire function is better, since most people will be using it to split strings. And the old "more general range-related" one relegated to the "lazy" renaming.

@brycelelbach
Copy link

Hi @Bananaman, thanks for the input. We don't use these GitHub issues for discussion of papers; we just use them to track status. But I'll ping @brevzin so he sees your feedback!

@brycelelbach
Copy link

brycelelbach commented Feb 19, 2021

2021-02-02 Library Evolution Telecon

P2210R1: Superior String Splitting

2021-02-02 Library Evolution Telecon Minutes

POLL: Send P2210R1 (Superior String Splitting) to electronic balloting to be forwarded to LWG for C++23 (Bucket 2, improvement) with the intention to retroactively apply the paper to C++20.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
16 4 2 0 0

Attendance: 34

# of Authors: 1

Author Position: SF

Outcome: Strong Consensus

POLL: P2210 Should add a feature test macro

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
3 2 5 7 1

Attendance: 33

# of Authors: 1

Author Position: WA

Outcome: No consensus

POLL: P2210 Should bump the value of a feature test macro

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
0 1 9 7 2

Attendance: 33

# of Authors: 1

Author Position: N

Outcome: No consensus

Summary

This paper proposes to improve views::split (and ranges::split_view) so that it works better for the important use case of splitting strings. The fix is backwards incompatible to what was published in C++20, however no implementation ships a production ready version yet, so we want to apply this fix before the status quo of C++20 will cause problems. We discussed if this change warrants a feature test macro, however there was no consensus for it, since we do not envision the in-between state that could be detected that way to ever ship in an implementation.

The old behaviour is still available under the new name views::lazy_split. There was some discussion about that name, however no serious suggestions came up. A different name will be considered iff it comes with strong rationale in form of a paper.

Outcome

The paper was forwarded to the Library Working Group, and to Electronic Polling with strong consensus.

@brycelelbach brycelelbach added ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll and removed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Feb 19, 2021
@JeffGarland JeffGarland added LWG Library lwg-fullreview Paper is ready for lwg full group review ranges std::ranges labels Mar 2, 2021
@JeffGarland
Copy link
Member

Tentatively scheduled for LWG review 2021-03-12

@JeffGarland
Copy link
Member

Review go moved forward to 2021-03-05. Unanimous consent (12-0-0) to move forward for c++23 -- retroactive to c++20. Will wait to move to plenary after LEWG electronic poll is complete.

https://wiki.edg.com/bin/view/Wg21telecons2021/P2210-20210305

@JeffGarland JeffGarland added C++23 Targeted at C++23 lwg-wait-for-lewg-electronic-poll and removed lwg-fullreview Paper is ready for lwg full group review labels Mar 5, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Mar 25, 2021

P2210R2 Superior String Splitting (Barry Revzin)

@JeffGarland JeffGarland added the C++20 Targeted at C++20 label Apr 9, 2021
@JeffGarland
Copy link
Member

@brycelelbach I'm adding the C++20 tag to reflect the papers that we want retroactive to c++20

@brycelelbach brycelelbach added scheduled-for-library-evolution-electronic-poll scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review and removed scheduled-for-library-evolution-electronic-poll labels Apr 23, 2021
@brycelelbach
Copy link

2021 Spring Library Evolution Polls

P2384: 2021 Spring Library Evolution Poll Outcomes

POLL 4: Send P2210R2 (Superior String Splitting) to Library Working Group for C++23, classified as an improvement of an existing feature (P0592R4 bucket 2 item), with the recommendation that implementations retroactively apply it to C++20.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
21 8 0 0 0

Outcome: Unanimous consensus in favor.

@brycelelbach brycelelbach removed LEWG Library Evolution lwg-wait-for-lewg-electronic-poll ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels May 28, 2021
@JeffGarland JeffGarland added the tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. label May 28, 2021
@cor3ntin cor3ntin added plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. and removed tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. labels Jun 7, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Oct 26, 2021

Adopted 2021-06.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e C++23 Targeted at C++23 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. ranges std::ranges
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants