-
Notifications
You must be signed in to change notification settings - Fork 213
Specify interactions with older language versions #2538
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f684982
Specify interactions with older language versions
leafpetersen efe62b0
Fix markdown
leafpetersen 49741ac
Fix capitalization
leafpetersen a01b093
Address comments
leafpetersen cbb7ac3
Address comments
leafpetersen 80fd918
Merge remote-tracking branch 'origin/master' into legacy_records
leafpetersen d1138c6
Merge
leafpetersen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are specifically enumerating the differences (and not just implicitly saying that the older language versions use the language which was current at that point), we should also mention the disambiguation changes:
try { } catch { } on (e) {}
has a method declaration namedon
in language < v, but doesn't in language >= v.@Foo () Function() f;
is a constructor invocation in the annotation in language < v, but isn't in language >= v.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be covered elsewhere (e.g. by the section that @munificent is adding on the grammar). This section describes the interactions between different language versions: it does not specify how the syntax of the the current language version is different from the syntax of the old language version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I can see the distinction.
Saying that
does look like it's saying where the new syntax differs from the old syntax - this syntax is in the new language, and not in the old.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of this section is to describe the interactions between language versions. It does so by circumscribing the set of errors that arise from using record features in older language versioned libraries (and noting that certain things are not in that set of errors, e.g. types that arise by inference). The first of the two things you mention is already covered in this proposal, I don't see value in adding it here. The second thing, I don't know the answer to, it's still under discussion.
If you really believe that these should be covered here, I'd suggest following up with a PR to re-organize as you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. If this section is simply on records, and not the entire feature around them (and we don't even know if those two changes will be rolled into the records flag, or just be released independently), then it makes sense to focus only on the actual record types.
I was considering those two changes as part of the records feature, at an equal level to record syntax, but that's probably premature.
So keep as is.