-
-
Notifications
You must be signed in to change notification settings - Fork 36
Clarify that open-close elements are placeholders, not expressions #540
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
Conversation
I think that's not quite true. All placeholders are expressions and they would still be expressions after all the various changes. However, the converse would not hold true. Not all expressions are placeholders. So the current text isn't wrong (with current spec wording) and wouldn't technically be wrong post all the changes. But I do think we should clarify the doc, hence giving an approval. I will note that @stasm has proposed alternatives that do not use placeholders to solve spannable. I don't personally care for these options, but they would use functions to implement spannable and those would be expressions in all senses of the term. |
@@ -1,4 +1,4 @@ | |||
# Open/Close Expressions | |||
# Open/Close Placeholders |
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 we would be better off calling this design "spannable" but don't care that much about it.
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.
All of the options currently being considered are placeholders
in a pattern; hence my suggested name for this.
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.
+1 to titling this design doc "Spannables". If you agree, please also rename the file.
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 would prefer "placeholders".
Do note that the proposed design includes this change to the ABNF: message-format-wg/exploration/open-close-expressions.md Lines 163 to 165 in 2bd3e6e
The explicit definition of the rule as not being an expression is needed to prevent it from showing up in e.g. local variable declarations. So after the changes here, not all placeholders will be expressions. |
Is this ready to merge? @stasm looking for any comments. |
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 it's good enough to use placeholders here to mean non-text pattern parts.
@@ -1,4 +1,4 @@ | |||
# Open/Close Expressions | |||
# Open/Close Placeholders |
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.
+1 to titling this design doc "Spannables". If you agree, please also rename the file.
@eemeli can you respond to the titling comment yay or nay so I can merge this? |
Merging fast track fixes. |
I noticed that the open-close design doc was in places (like its title...) talking about expressions when it's really about placeholders. In our current syntax, those are synonymous, but the change we're proposing here would make them different, and while markup would be a placeholder, it would not be an expression.
Requesting fast-tracking, as we're currently discussing this in #537.