Skip to content

Add formatting instructions related to external variables vs. name #442

Closed
@aphillips

Description

@aphillips

Is your feature request related to a problem? Please describe.
The syntax restricts the names of variables that can appear in a message, but most implementations will permit arguments whose names are "just strings" and thus not restricted to the namespace in a message. For example:

Map args = ImmutableMap.of(
  "   bad key   ",       "my key has spaces",
  "-\u0370\uD800\uFDD0", "my key has bad chars",
  "looksOkay ",          "... but isn't"
);

This is really just a tracking issue to spur discussion of normative/informative criteria.

Describe the solution you'd like
Add instructions to formatting.md for authors. Potentially allow implementations to do minor fix-ups (notably, trimming whitespace). Allow implementations to warn users of badly formed keys.

Note that I use the word "allow", not "require". Illegal keys should never result in runtime errors--they just don't match anything. Some implementations might not wish to implement warnings, due to resource constraints or just due to the fact that normal formatting doesn't provide a mechanism to return warnings through.

Describe why your solution should shape the standard
Users need to know about this quirk.

Additional context or examples
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    formattingIssue pertains to the formatting section of the spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions