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

P1371 Pattern Matching #166

Open
jensmaurer opened this issue Jan 26, 2019 · 19 comments
Open

P1371 Pattern Matching #166

jensmaurer opened this issue Jan 26, 2019 · 19 comments
Labels
EWG Evolution needs-revision Paper needs changes before it can proceed

Comments

@jensmaurer
Copy link
Member

P1371R0 Pattern Matching (Sergei Murzin, Michael Park, David Sankel, Dan Sarginson)

@jensmaurer jensmaurer added this to the 2019-02 milestone Jan 26, 2019
@jensmaurer jensmaurer added the EWG Evolution label Jan 26, 2019
@villevoutilainen villevoutilainen added this to EWGSaturday in EWGKonaFeb2019 Feb 11, 2019
@jfbastien
Copy link
Collaborator

jfbastien commented Feb 12, 2019

P1260R0 Pattern Matching #363 and P1308R0 Pattern Matching #364 were seen by EWGI in SAN.
Strong support, authors got feedback to address.

@jensmaurer
Copy link
Member Author

EWG in Kona

@jensmaurer jensmaurer removed this from the 2019-02 milestone Mar 20, 2019
@wg21bot
Copy link
Collaborator

wg21bot commented Jun 23, 2019

P1371R1 Pattern Matching (Sergei Murzin, Michael Park, David Sankel, Dan Sarginson)

@wg21bot wg21bot added this to the 2019-07 milestone Jun 23, 2019
This was referenced Jul 8, 2019
@jensmaurer
Copy link
Member Author

EWG in Cologne

@jensmaurer jensmaurer removed this from the 2019-07 milestone Aug 23, 2019
@jfbastien jfbastien added this to Would be nice to talk about in EWGBelfast2019 Oct 15, 2019
@jfbastien jfbastien moved this from Would be nice to talk about to Wednesday in EWGBelfast2019 Nov 5, 2019
@jfbastien
Copy link
Collaborator

EWG saw this: http://wiki.edg.com/bin/view/Wg21belfast/P1371-EWG

EWG is interested in hearing more about pattern matching in the general direction presented

SF F N A SA
20 9 1 0 0

@wg21bot
Copy link
Collaborator

wg21bot commented Jan 18, 2020

P1371R2 Pattern Matching (Sergei Murzin, Michael Park, David Sankel, Dan Sarginson)

@wg21bot wg21bot added this to the 2020-02 milestone Jan 18, 2020
@jfbastien jfbastien added this to Unscheduled in EWG Prague Jan 22, 2020
@jfbastien jfbastien moved this from Unscheduled to Tuesday in EWG Prague Jan 23, 2020
@jfbastien
Copy link
Collaborator

EWG Prague on Tuesday afternoon:

Pattern matching should require a case that always matches.

SF F N A SA
8 10 12 5 4

Assuming we don’t mandate a case that always matches, if no case matched, we get UB.

SF F N A SA
8 14 7 6 9

Drop the expression form.

SF F N A SA
6 7 8 7 12

Drop the statement form.

SF F N A SA
0 1 5 12 23

Pattern matching shouldn’t have arbitrary lookahead.

SF F N A SA
31 10 3 1 0

@jfbastien jfbastien added the needs-revision Paper needs changes before it can proceed label Feb 11, 2020
@jfbastien
Copy link
Collaborator

EWG Prague Friday afternoon, discuss design tuning: an update from earlier this week, Pattern_Matching_Updates.pdf

Non-void inspect expressions should have at least one pattern which, on its own, can match every possible value.

SF F N A SA
0 0 2 11 13

@jensmaurer jensmaurer removed this from the 2020-02 milestone Feb 18, 2020
@jfbastien
Copy link
Collaborator

We discussed exhaustiveness checking in today's EWG telecon, and took the following poll:

POLL We like the presented approach to exhaustiveness checking in pattern matching.

SF F N A SA
6 11 5 2 1

@bobfang1992

This comment has been minimized.

@jensmaurer

This comment has been minimized.

@mhoemmen

This comment has been minimized.

@mhoemmen

This comment has been minimized.

@jfbastien
Copy link
Collaborator

EWG discussed "inspect is always an expression" in a telecon today.

POLL: Allow break and continue leaving from inspect expressions.

SF F N A SA
7 5 6 1 1

Lots of other feedback was given to the authors, and everyone agreed to more exploration. We did not poll these.

@wg21bot
Copy link
Collaborator

wg21bot commented Sep 23, 2020

P1371R3 Pattern Matching (Michael Park, Bruno Cardoso Lopes, Sergei Murzin, David Sankel, Dan Sarginson, Bjarne Stroustrup)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Sep 23, 2020
@wg21bot wg21bot added this to the 2020-telecon milestone Sep 23, 2020
@jfbastien
Copy link
Collaborator

Today in the EWG telecon, we discussed goto in pattern actions. Polls:

Support goto jumping into a pattern.

SF F N A SA
0 0 1 4 19

Support goto jumping out of a pattern, when the goto jumps forward, not across a variable declaration or into a nested scope.

SF F N A SA
1 12 6 3 1

Support goto jumping out of a pattern, without additional constraints.

SF F N A SA
2 3 11 5 1

Support goto which remains strictly within its pattern.

SF F N A SA
7 8 6 0 0

Bjarne wrote a short paper to start our discussion, and will come back with a bigger paper which covers all the cases and feedback received.

@jensmaurer jensmaurer modified the milestones: 2020-telecon, 2021-telecon Dec 28, 2020
@jfbastien
Copy link
Collaborator

Bruno presented his implementation experience to EWG on 2021-02-25.
Godbolt demo: https://godbolt.org/z/fdd5j4
Feedback was given to the authors.

@jfbastien
Copy link
Collaborator

EWG discussed Pattern matching identifier patterns syntax: let vs auto vs none on April 8th.

POLL: annotate id-pattern with auto.

inspect (e) { // like this:
 
  auto&& x => binds

  x => matches

}
SF F N A SA
0 3 4 3 8

POLL: if we annotate id-patterns with let.

inspect (e) { // like this:

  let x => binds

  x => matches

}
SF F N A SA
3 6 6 2 2

POLL: keep the current p1371r3 proposal with case.

inspect (e) { // like this:

  x => // binds

  case x => matches

}
SF F N A SA
2 6 8 0 3

@jensmaurer jensmaurer modified the milestones: 2021-telecon, 2022-telecon Jan 1, 2022
@erichkeane erichkeane added the needs-revision Paper needs changes before it can proceed label Mar 7, 2022
@erichkeane
Copy link
Collaborator

Adding needs-revision, this got EWG feedback in April of '21.

@jensmaurer jensmaurer removed this from the 2022-telecon milestone Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EWG Evolution needs-revision Paper needs changes before it can proceed
Projects
No open projects
Development

No branches or pull requests

7 participants