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

[FEEDBACK] SHOULD, MAY, and RECOMMENDED are confusing and meaningless #977

Open
sffc opened this issue Jan 13, 2025 · 5 comments
Open

[FEEDBACK] SHOULD, MAY, and RECOMMENDED are confusing and meaningless #977

sffc opened this issue Jan 13, 2025 · 5 comments
Labels
LDML47 LDML 47 Release (Stable) Preview-Feedback Feedback gathered during the technical preview

Comments

@sffc
Copy link
Member

sffc commented Jan 13, 2025

If I'm an implementer looking at building an MF2 implementation, I see these types of words throughout the spec:

  • MUST
  • MUST NOT
  • REQUIRED
  • SHOULD
  • MAY
  • RECOMMENDED
  • Proposed (not all caps?)

As far as I am concerned, there should be only the following classes of normative text:

  1. Things required for conformance
  2. Optional extensions, which, if implemented, must have certain behavior

ECMA-262 has Annex B for the optional extensions, and ECMA-402 has a small number of blocks labeled "normative optional" for this. Both of these systems are clear to me.

Scattering words like SHOULD and MAY and RECOMMENDED throughout the text does not help me figure out what I need to do and what I do not need to do. I would much rather have the non-normative items split out into an appendix. Likewise, things that are "Proposed" should not be in the spec at all; they should be in a separate document.

(tagging this as LDML 47 because this makes me confused about what we're actually approving)

@sffc sffc added Preview-Feedback Feedback gathered during the technical preview LDML47 LDML 47 Release (Stable) labels Jan 13, 2025
@sffc

This comment was marked as off-topic.

@macchiati
Copy link
Member

I think there are 5 categories:

  1. You must do X
  2. You should do X (but it is not required)
  3. You should not do X (but it is not forbidden)
  4. You must not do X (it is forbidden)
    OR
  5. X is completely optional (none of the above)

For 'optional' options or functions we are really talking about case 1, case 2, or case 5. One possibility to alleviate your concern would be to use a different namespace for items that are not required, eg o:calendar=islamic-civil; that would put users on notice that that option may be ignored in some implementations.


X is Proposed is orthogonal. It is giving a head's up to readers that is likely that X will be either case 1 or case 2 in a future version. Having it in the same section of the spec is like having a tech-preview section of the spec; it highlights it to the very users we want feedback from.

@aphillips
Copy link
Member

I would point out that the capitalized words are called out in the intro, using boilerplate that is super-common in standards. These are the BCP14 (RFC2119) keywords:

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

The words in question are not "scattered". They are deliberately placed. The specification as a whole is normative, except where it clearly states that it is not normative (cf. examples) and the use of normative language is carefully considered.

The default function set introduces keywords REQUIRED and RECOMMENDED for functions and their options and it defines them using 2119-keyword normative language. The names chosen are consistent with their 2119 meaning (REQUIRED == MUST, RECOMMENDED == SHOULD). One could argue that we should use non-2119 words for these to avoid any confusion.

"Proposed" is limited to the function set and :u namespace and is used to indicate maturity. The items in question have been accepted by the WG but are not yet standardized.

Note that post-tech preview (this morning, actually) the function sets and namespaces were separated from the core specification into separate directories and will be subject to their own management process separate from the specification going forwards. Hopefully that relieves some of the tension.

--

(chair hat)

Please do not feel the need to manage release labels. The chair does that as a service 😉

@sffc
Copy link
Member Author

sffc commented Jan 14, 2025

Okay. I prefer the ECMA-402 or ECMA-262 style that avoids the mixing of normative and normative-optional text, but I understand if this is the style you all are using.

Fewer terms where possible seems like a good improvement.

I would prefer terms that don't appear to take a position on whether an implementation is better off doing something or not. If an implementation SHOULD do something, it is not required, but it empowers users of a library to file bug reports saying "why are you not doing this think you SHOULD be doing?" I prefer language such as MAY OPTIONALLY.

I spun my other comment about making the normative-optional extensions more explicit into a different thread, #978

@aphillips
Copy link
Member

The 2119 keyword SHOULD is often misunderstood. It is stronger than MAY--it is, in fact, judgemental in the way you don't care for 🙈

To be specific, it means:

This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

In general, the word means that it doesn't break conformance (and is, thus, "optional") to not do it, but implementers are strongly encouraged to treat it like a soft MUST. This is different from the keyword MAY (which we also use).

MAY means something is optional:

This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)

You're encouraged to file issues in places where the WG has chosen the stronger SHOULD in which you feel the normative strength ought to be MAY or was intended to be MAY. Frequently in our spec, SHOULD is intended to allow non-implementation but to discourage violation. For example, we say that unpaired surrogates SHOULD NOT be used in messages. I just now reviewed the use of SHOULD and don't actually see any (with one exception) that I would personally change.

(The exception is that we break our own rules and use SHOULD in a note in the :string function document):

Users SHOULD encode messages and their parts in Unicode Normalization Form C (NFC) unless there is a very good reason not to.

(Bug to follow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LDML47 LDML 47 Release (Stable) Preview-Feedback Feedback gathered during the technical preview
Projects
None yet
Development

No branches or pull requests

3 participants