Skip to content
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

Document the introduction of the text-first mode #512

Closed
stasm opened this issue Nov 3, 2023 · 3 comments
Closed

Document the introduction of the text-first mode #512

stasm opened this issue Nov 3, 2023 · 3 comments
Labels
design Design principles, decisions documentation Improvements or additions to documentation Future Deferred for future standardization Stale

Comments

@stasm
Copy link
Collaborator

stasm commented Nov 3, 2023

#474 pivoted into a discussion about variant patterns. Consequently, we now lack a good design doc about the text-first mode, a.k.a. unquoted simple patterns.

I can recall a few arguments discussed in the past in favor of code-first mode, which requires quoting all patterns:

  • The consistency between simple and variant patterns, which can make the syntax easier to learn and easier to recall for some.
  • Clear whitespace rules for all patterns.
  • Fewer iteration hazards when adding declarations and variants.
  • The ability to recognize a MF2 string in the wild just by looking at it, which hints at what sort of escapes and other rules can be applied if necessary.
  • A distinct fallback syntax in case the i18n layer misbehaves -- if you see {Hello} in the UI, it means something's broken (a.k.a. pseudolocalization).

After Seville, we brought up the commonness of simple messages and questioned the cost of requiring to always quote them.

@aphillips aphillips added documentation Improvements or additions to documentation syntax Issues related with MF Syntax design Design principles, decisions and removed syntax Issues related with MF Syntax labels Nov 10, 2023
@gibson042
Copy link
Collaborator

I've raised the concept of "iteration hazard" elsewhere, and reiterated it in #526 as stemming from a fundamental distinction between "simple message" vs. "complex message" rather than the former being merely a degenerate case of the latter that happens to have no declarations and no matcher.

I also noted specifically in #526 (comment) that the desired unification can be achieved with a decision to start in code mode OR to start in text mode, but either way it is entangled with quoting—the requirements and interpretation for which must be consistent regardless of presence vs. absence of declarations/matchers (for example, introducing or removing an irrelevant singleton declaration and immediately following line feeds without changing any other content must not invalidate a message or change the significance of leading/trailing whitespace).

This concern may ultimately be rejected, but I hope that it would at least be acknowledged explicitly rather than as an implicit consequence of what participants considered to be isolated decisions. And I think this is the right issue for that.

@aphillips aphillips added the Future Deferred for future standardization label Jan 8, 2024
@aphillips
Copy link
Member

Valuable exercise but not required for the 45 timeframe

@aphillips
Copy link
Member

I'm marking this as "Stale" for now, but welcome moving it into the 46.1 bucket if we think this is somehow still relevant/useful work. I note the existence of code-mode-introducer as a design doc. Recent changes to remove reserved-statement and its friends may have helped or hindered this effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design principles, decisions documentation Improvements or additions to documentation Future Deferred for future standardization Stale
Projects
None yet
Development

No branches or pull requests

3 participants