-
-
Notifications
You must be signed in to change notification settings - Fork 35
Provide normative guidance on function/option/option value impl. #925
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
Changes from 5 commits
4ab5aff
eafc745
0656662
0a78c8e
380c6ff
5b0ff59
186890f
cd8db87
1d7c836
2cc3e04
32bfa3b
327ead3
0b36edc
b34fd64
5dc5067
1e5a13d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,48 @@ | ||
| # MessageFormat 2.0 Default Function Registry | ||
|
|
||
| This section describes the functions for which each implementation MUST provide | ||
| a _function handler_ to be conformant with this specification. | ||
|
|
||
| Implementations MAY implement additional _functions_ or additional _options_. | ||
| In particular, implementations are encouraged to provide feedback on proposed | ||
| _options_ and their values. | ||
| This section defines the **standard** _functions_ which are REQUIRED for conformance with this specification, | ||
| along with **optional** _functions_ that SHOULD be implemented to support | ||
| additional functionality. | ||
|
|
||
| To **_<dfn>accept</dfn>_** a function means that an implementation MUST NOT | ||
| emit an _Unknown Function_ error for that _function_'s _identifier_. | ||
| To _accept_ an option means that an implementation MUST NOT | ||
| emit a _Bad Option_ error for that _option_'s _identifier_ when used with the _function_ | ||
| it is defined for | ||
| and MUST NOT emit a _Bad Option_ error for any of the _option_ values | ||
| (both **standard** and **optional**) | ||
aphillips marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| defined for that _option_. | ||
| Accepting a _function_ or its _options_ does not mean that a particular output is produced. | ||
|
|
||
| _Functions_ can define _options_. | ||
| An _option_ can be **standard** or **optional**. | ||
|
|
||
| Implementations MUST _accept_ each **standard** _function_ and | ||
| MUST _accept_ all _options_ and _option_ values defined as **standard** for those _functions_. | ||
aphillips marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Implementations SHOULD _accept_ each **optional** _function_. | ||
| For each such _function_, the implementation MUST accept all _options_ and _option_ values | ||
aphillips marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| listed as **standard** for that _function_. | ||
|
|
||
| Implementations SHOULD _accept_ _options_ and _option_ values that are marked as **optional**. | ||
aphillips marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Implementations MAY _accept_ _functions_ not defined in this specification. | ||
| Functions not defined by any version of this specification MUST use an implementation-defined _namespace_. | ||
| In addition, implementations SHOULD provide mechanisms for users to | ||
| register and use user-defined _functions_ and their associated _functional handlers_. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this not mean that any user-defined function "MUST use an implementation-defined namespace"? That seems rather arbitrary. I do not think that we ought to place any such restrictions on user-defined functions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So... SHOULD use an implementation defined namespace, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's weird too; the namespace used by a user-defined function should be entirely user-definable, and we should continue to allow for user functions using no namespace at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Does that fix it? (I added or user-defined) I agree with you that impls/users can do whatever they want, but we should provide guidance not to use un-namespaced functions that we don't define. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (mutated the text: have a look) |
||
|
|
||
| Implementations MAY implement additional _options_ not defined here. | ||
aphillips marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Such _options_ MUST use an implementation-specific _namespace_. | ||
aphillips marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Implementations MAY _accept_ additional _option_ values for _options_ defined here, | ||
| although care needs to be exercised to ensure interoperability | ||
| and to avoid collisions with future standardization. | ||
| There is no namespace mechanism for _option_ values, | ||
| however, the [stability policy](#stability-policy) for this specification | ||
|
||
| permits only the ranges a-z, A-Z, and 0-9 in _option_ values. | ||
aphillips marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Implementation-defined values SHOULD use a distinguishing character | ||
| or character sequence, such as by prefixing with a `_` U+005F LOW LINE, | ||
| to ensure that they don't collide with future standardization. | ||
aphillips marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| > [!NOTE] | ||
| > The [Stability Policy](/spec#stability-policy) allows for updates to | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.