Skip to content

Enclose selectors so that it's clear what they are #257

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

Closed
stasm opened this issue May 12, 2022 · 6 comments
Closed

Enclose selectors so that it's clear what they are #257

stasm opened this issue May 12, 2022 · 6 comments
Labels
blocker Blocks the release resolve-candidate This issue appears to have been answered or resolved, and may be closed soon. syntax Issues related with syntax or ABNF

Comments

@stasm
Copy link
Collaborator

stasm commented May 12, 2022

@markusicu wrote in #230 (comment):

The next most confusing thing is figuring out which placeholder-looking item becomes an input to the selection, and how those match up to the variant value tuples. You really need to enclose the selectors so that it's clear which ones they are, and the number of selectors needs to be the same as the number of values in each value tuple. I suggest enclosing both the list of selectors and each value tuple in square brackets. Bracketing both selectors and tuples correlates them visually.

@stasm stasm added the syntax Issues related with syntax or ABNF label May 12, 2022
@eemeli
Copy link
Collaborator

eemeli commented May 13, 2022

Quoting @stasm from #263 (comment):

My example also has long variant keys with spaces to demonstrate what they would look like with delimiters, but the EBNF allows bare variant keys too. I think a more realistic example would be this:

"{$foo :func} {$bar :func} one one [Some text...] one few [etc.]"

There's #251 about making the preamble with selectors stand out more from the rest of the message, but otherwise I think this is actually pretty minimal.

The thing that struck me about this example is that when glancing at it, I first see the undelimited one one and one few. In order to register that the actual contents of the message would be Some text... or etc., I need to actively think about how MF2 works.

If instead the delimiters were around the keys:

"{$foo :func} {$bar :func} [one one] Some text... [one few] etc."

it becomes much easier for me to see the contents before I see the markup.

@romulocintra romulocintra added the blocker Blocks the release label May 16, 2022
@romulocintra romulocintra added this to the Technical Preview milestone May 16, 2022
@echeran
Copy link
Collaborator

echeran commented May 19, 2022

+1 to @markusicu and @eemeli for preferring delimiting selector value tuples. It reduces cognitive load for humans when they mentally parse.

The original comment also mentions delimiting the definitions of the selectors, which sounds consistent and preferable to me.

@echeran
Copy link
Collaborator

echeran commented May 19, 2022

Issue #253 has our previous discussion on the topic, although it only focused on the part about selector value tuples, not their definitions. The comments there, too, are in support of delimiting, asking why we wouldn't.

@eemeli
Copy link
Collaborator

eemeli commented May 20, 2022

As an expansion of my comment above, I've now filed #275.

Also, I recognise that my comment here should probably have been applied to #253.

@stasm
Copy link
Collaborator Author

stasm commented Jun 1, 2022

This might be one of the issues that are too fine-grained. #253 is so closely related that it might be a good idea to close this one and continue the discussion there.

@stasm stasm added the resolve-candidate This issue appears to have been answered or resolved, and may be closed soon. label Jun 7, 2022
@eemeli
Copy link
Collaborator

eemeli commented Jun 13, 2022

Conclusion: This issue is redundant, will continue in #253.

@eemeli eemeli closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Blocks the release resolve-candidate This issue appears to have been answered or resolved, and may be closed soon. syntax Issues related with syntax or ABNF
Projects
None yet
Development

No branches or pull requests

4 participants