-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
[FEEDBACK] Isolating quoted patterns on the outside adds a lookahead to the syntax #787
Comments
Putting the isolate between the pattern quotes would mean that there are two sequences for opening/closing. And it is harder for tools to insert (or remove) the isolates. It's cognitive burden on everyone, although admittedly it's clever. Note that the isolates (unless inside of a literal) are ignorable and can be stripped from the message. |
This is also the case with isolates outside the quotes. The current proposal has:
I'm suggesting that we instead use
Both solutions are just as easy or hard to deal with. As MF2 may include e.g. |
I think the difference is (especially if we make the pairing optional!) that the open and close isolates can just be ignored in the current design. With optional pairing, we can push the isolate characters back into the |
An observation from implementing bidi isolation as proposed in #781, but which also applies to the currently proposed design for bidi usability:
Isolating quoted patterns on the outside adds LRI, RLI & FSI to the set of characters (currently
{
and.
) that could start a quoted message with no declarations, as in\u2066{{hello}}\u2069
.This doesn't make the syntax ambiguous as the
{{
isn't valid in asimple-message
, but it does add a lookahead of one token to the parser.The same lookahead is also required in
variant
, to determine whether a\u2066
starts aquoted
key
, or aquoted-pattern
.The simplest change to avoid this lookahead would probably be to place the
open-isolate
andclose-isolate
between the braces, as in{\u2066{hello}\u2069}
. In this position, it would also match what's proposed forexpression
andmarkup
.The text was updated successfully, but these errors were encountered: