Skip to content

Add a new chapter to define concepts related to pattern-matching. #757

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

Merged
merged 14 commits into from
Apr 11, 2023

Conversation

gafter
Copy link
Member

@gafter gafter commented Mar 19, 2023

I want to add a new chapter because this will get a lot more complicated
later, for example when we add recursive patterns.

This is proposed to replace #61.

@gafter gafter requested review from BillWagner, Nigel-Ecma and MadsTorgersen and removed request for BillWagner March 19, 2023 05:41
@gafter gafter self-assigned this Mar 19, 2023
@gafter gafter added the meeting: discuss This issue should be discussed at the next TC49-TG2 meeting label Mar 19, 2023
@BillWagner
Copy link
Member

Leaving notes for discussion Wednesday on how to add a chapter and ensure our tools work:

The order of clauses is defined in clauses.json for the renumbering tool. The markdown converter relies on the section numbers added by the renumbering tool.

Three other tools all have arrays of filenames in the shell scripts that run the tool:

I can take on the task to update those tools. I'll propose keying all the tools off the clauses.json file.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do like the idea of a new clause for patterns. I had a few comments and nits, but otherwise this is great.

Copy link
Contributor

@jskeet jskeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Various comments, but I like having patterns in their own section. Let's talk in the meeting about concrete steps going from here to merged.

(This is the sort of thing where I'm a terribly judge of whether it's actually "done" or not - there are any number of paragraphs that Neal could have omitted and I'd never have noticed...)

@jskeet
Copy link
Contributor

jskeet commented Mar 22, 2023

  • Bill to add a commit to fix the GH Actions
  • Neal can address any trivial issues
  • If we can get the new xrefs working before merging, let's try to get that in
  • We can then merge, and then fix any remaining nits afterwards
  • If we didn't get xrefs working before, do it now.


Each pattern form defines the set of types for input values that the pattern may be applied to. We say a pattern `P` is *applicable to* a type `T` if `T` is among the types whose values the pattern may match. It is an error if a pattern `P` appears in a program to match a *pattern input value* of type `T` if `P` is not applicable to `T`.

Each pattern form defines the set of values for which the pattern *matches* the value.
Copy link
Member Author

@gafter gafter Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Say this is a runtime concept. (Not urgent, or even necessary)

@BillWagner
Copy link
Member

My last commit gets the section renumber tool to work correctly (once #664 is merged).

I'll make a fresh PR to get the other tools using the same config file for chapter sources

@jskeet
Copy link
Contributor

jskeet commented Apr 11, 2023

I'm going to rebase this, fix the conflicts, and merge it, so that we've got it in the Word document draft. The remaining comments will still need to be addressed, but that can happen afterwards.

gafter and others added 3 commits April 11, 2023 14:43
I want to add a new chapter because this will get a lot more complicated
later, for exanmple when we add recursive patterns.
gafter and others added 7 commits April 11, 2023 14:43
This fixes the section renumbering tool for the added new clause.
Add the new patterns clause to both the patterns generator and the validate grammar scripts.
Because the first line isn't an H1, the grammar validator is skipping this file.
Testing the regex for not skipping the new clause.
@jskeet jskeet force-pushed the Neal-v7-patterns branch from 9fb12a8 to 5cd4522 Compare April 11, 2023 13:43
@BillWagner
Copy link
Member

I'm going to rebase this, fix the conflicts, and merge it, so that we've got it in the Word document draft. The remaining comments will still need to be addressed, but that can happen afterwards.

Good plan. Can you ping me when you merge it? (@ - mention is fine). I'll likely have some downstream links to fix once it's merged, and the sections have been renumbered.

@jskeet
Copy link
Contributor

jskeet commented Apr 11, 2023

@BillWagner: I've temporarily disabled the check for all conversations to be resolved (as we want to address those afterwards) but we need to get the renumbering working. Are you happy to pull this branch, fix that up and repush? I'm hoping the Word converter will work after the renumbering is done.

@BillWagner
Copy link
Member

@BillWagner: I've temporarily disabled the check for all conversations to be resolved (as we want to address those afterwards) but we need to get the renumbering working. Are you happy to pull this branch, fix that up and repush? I'm hoping the Word converter will work after the renumbering is done.

Yes. I can do it. My comment #757 (comment) has my notes from earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meeting: discuss This issue should be discussed at the next TC49-TG2 meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants