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

P2322 ranges::fold #1004

Closed
wg21bot opened this issue Feb 22, 2021 · 11 comments · Fixed by cplusplus/draft#5645
Closed

P2322 ranges::fold #1004

wg21bot opened this issue Feb 22, 2021 · 11 comments · Fixed by cplusplus/draft#5645
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 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 tentatively-ready-for-plenary Reviewed between meetings; ready for a vote.
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Feb 22, 2021

P2322R0 ranges::fold (Barry Revzin)

@wg21bot wg21bot added the LEWG Library Evolution label Feb 22, 2021
@wg21bot wg21bot added this to the 2021-telecon milestone Feb 22, 2021
@brycelelbach brycelelbach added 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 23, 2021
@brycelelbach brycelelbach added the ranges std::ranges label Mar 22, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Mar 25, 2021

P2322R1 ranges::fold (Barry Revzin)

@brycelelbach brycelelbach added B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++23 Targeted at C++23 IS Ship vehicle: IS 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 This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Apr 23, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Apr 25, 2021

P2322R2 ranges::fold (Barry Revzin)

@ben-craig
Copy link
Collaborator

ben-craig commented May 8, 2021

2021-05-03 Library Evolution Telecon

P2322R2: ranges::fold

2021-05-03 Library Evolution Telecon Minutes

Chair: Ben Craig

Champion: Tim Song

Minute Taker: Inbal Levi

Start: 2021-05-03

POLL: fold with an initial value, and fold with no initial value and non-empty range should have different names (presumably fold and fold_first)

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
6 6 3 2 1

Attendance: 27

# of Authors: 0

Author Position:

Outcome: Consensus in favor

SA: Most other languages don't use different names here. Very common to have one name and two forms

POLL: Rename fold_left to fold

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
2 10 8 3 0

Attendance: 27

# of Authors: 0

Author Position:

Outcome: Very Weak Consensus. Mostly author's choice

POLL: Return the end iterator in addition to the result

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
2 3 5 4 6

Attendance: 26

# of Authors: 0

Author Position:

Outcome: Weak consensus against

Suggested action: Others should provide data and rationale on where we have regretted not returning all the bits of information calculated by an algorithm.

POLL: Have a version of the fold algorithms that return the end iterator in addition to the result (as either an additional set of functions, or having some of the versions have different return values)

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 9 3 3 1

Attendance: 24

# of Authors: 0

Author Position:

Outcome: Weak consensus in favor. Have a revision that addresses this issue. Would like motivation for or against in the next paper.

Example from a later reflector discussion where an end iterator would be useful:

fold_left(take(generator, 10), plus())

If you want to pick up from where take left off, you need fold_left to return an end iterator.

@inbal2l inbal2l added SG9 Ranges SG and removed LEWG Library Evolution 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 Jun 8, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Jun 26, 2021

P2322R3 ranges::fold (Barry Revzin)

@inbal2l inbal2l 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 Jun 27, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Sep 20, 2021

P2322R4 ranges::fold (Barry Revzin)

@brycelelbach brycelelbach added the ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting label Sep 28, 2021
@inbal2l inbal2l removed the SG9 Ranges SG label Oct 17, 2021
@inbal2l
Copy link
Collaborator

inbal2l commented Oct 19, 2021

2021-10-18 Library Evolution Telecon

P2322R5: ranges::fold

2021-10-18 Library Evolution Telecon Minutes

Chair: Inbal Levi

Champion: Barry Revzin

Minute Taker: Ben Craig

Polls

POLL: fold with an initial value and fold with no initial value, should have the same name (presumably just foldl)

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

Attendance: 27
# of Authors: 1
Author Position: WA
Outcome: Weak consensus against.

POLL: The foldl suffix in P2322R5 (ranges::fold) should be:
Vote once:

foldl1 (currently in paper) foldl_1 foldl_one foldl_first
1 0 7 10

Attendance: 29
# of Authors: 1
Author Position: foldl_first
Outcome: foldl_first

POLL: The foldl, foldr suffix in P2322R5 (ranges::fold) should be:
Vote once:

foldl, foldr (currently in the paper) fold_left, fold_right
6 10

Attendance: 29
# of Authors: 1
Author Position: (abstain)
Outcome: fold_left, fold_right

POLL: Rename fold_left to fold:
Vote once:

fold_left fold Have both fold_left, fold
6 7 3

Attendance: 29
# of Authors: 1
Author Position: Both
Outcome: No strong preference between fold_left and fold, author will include options in the proposed set

POLL: We like the design presented for P2322R5 (ranges::fold) (names should be suggested on the mailing list and approved on LEWG telecon)

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

Attendance: 31
# of Authors: 1
Author Position: SF
Outcome: Consensus in favor

Outcome

Guidance for the names set:

  • foldl_first is preferable over foldl1, foldl_1, foldl_one
  • fold_left, fold_right is preferable over foldl, foldr
  • No distinguish preference between having a shorter "fold" version for the more common fold_left, or to have both.

The design presented was approved, names will be voted on the next "Ranges" related LEWG telecon.

@wg21bot
Copy link
Collaborator Author

wg21bot commented Oct 26, 2021

P2322R5 ranges::fold (Barry Revzin)

@inbal2l
Copy link
Collaborator

inbal2l commented Oct 27, 2021

2021-10-26 Library Evolution Telecon

P2322R5: ranges::fold

2021-10-26 Library Evolution Telecon Minutes

Chair: Inbal Levi

Champion: Barry Revzin

Minute Taker: Ben Craig

Polls

Options:

A, fold, fold_first, fold_right, fold_right_first

B, fold, fold_first, fold_right, fold_right_last

C, fold_left, fold_left_first, fold_right, fold_right_first

D, fold_left, fold_left_first, fold_right, fold_right_last

E, fold == fold_left, fold_first == fold_left_first, fold_right, fold_right_first

F, fold == fold_left, fold_first == fold_left_first, fold_right, fold_right_last

G

  • "fold" means left fold returning value (most common thing)
  • _first, _last suffix is always added for version that do not have initalizer
  • _left/_right inffix/suffix is used for iterator returning version

POLL: Forward P2322R5: ranges::fold with the name set in option D to LWG for C++23 (to be confirmed with electronic poll) priority 2

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
8 4 2 1 0

Outcome

P2322R5 was forwarded to LWG (to be approved with electronic poll)

@inbal2l inbal2l 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 Oct 27, 2021
@JeffGarland JeffGarland added the LWG Library label Dec 13, 2021
@jensmaurer jensmaurer removed this from the 2021-telecon milestone Jan 1, 2022
@jensmaurer jensmaurer added this to the 2022-telecon milestone Jan 1, 2022
@cor3ntin cor3ntin added the LEWG Library Evolution label Jan 12, 2022
@brycelelbach brycelelbach added 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 This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Feb 1, 2022
@cor3ntin
Copy link

cor3ntin commented Feb 16, 2022

2022-01 Library Evolution Electronic Poll Outcomes

Send [P2322R5] (ranges::fold) to Library Working Group for C++23, classified as an addition ([P0592R4] bucket 3 item)

SF F N A SA
16 14 2 0 0

Strong Consensus in favor.

@cor3ntin cor3ntin removed LEWG Library Evolution 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 Feb 16, 2022
@brycelelbach brycelelbach added the lwg-pending LWG Chair needs to disposition label Feb 23, 2022
@JeffGarland
Copy link
Member

LWG reviewed and approved for c++23 on 2022-04-22

https://wiki.edg.com/bin/view/Wg21telecons2022/P2322-20220422

JW, JG: I'm volunteering to check the small changes

poll: put p2322r6 into C++23?

F A N
10 0 0

@JeffGarland JeffGarland added tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. and removed lwg-pending LWG Chair needs to disposition labels Apr 23, 2022
@wg21bot
Copy link
Collaborator Author

wg21bot commented Apr 25, 2022

P2322R6 ranges::fold (Barry Revzin)

@cor3ntin cor3ntin added the plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. label Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 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 tentatively-ready-for-plenary Reviewed between meetings; ready for a vote.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants