mjs at apple.com
Sun Nov 16 19:31:30 PST 2008
On Nov 16, 2008, at 6:42 PM, David-Sarah Hopwood wrote:
> Peter Michaux wrote:
>> On Sat, Nov 15, 2008 at 11:18 PM, Peter Michaux <petermichaux at gmail.com
>> > wrote:
>>> Also is it "should" or "must"? RFC documents are usually very strict
>>> about defining "should" etc and I don't see a definition of "should"
>>> before page 41 of the pdf where this use occurs.
>> I think explicitly adopting these definitions would be a good step in
>> improving the clarity of the ECMAScript standard.
> I advise caution here: many, perhaps most of the existing uses of
> or "must not" in ECMA-262 or the Kona draft are not consistent with
> RFC2119 definitions.
> The RFC2119 meaning of MUST is a mandatory conformance requirement on
> implementations of the protocol or format defined in the RFC. For a
> programming language spec, it is ambiguous whether this means a
> requirement on valid programs, or a requirement on the language
> implementation. It's important for those to be distinguished.
RFC2119 is a mandatory conformance requirement on a particular
conformance class. For many specs the set of conformance classes may
be clear from context; when this is not so, it's good to explicitly
define conformance classes such as "conforming implementation" and
"conforming program" and make clear which conformance requirements
apply to which.
(Note, depending on how the conformance requirements are defined,
conforming implementations may be required to have particular behavior
for some nonconforming programs.)
> If a mathematical operation or function is applied to a floating-
> number, it should be understood as being applied to the exact
> mathematical value represented by that floating-point number;
> such a floating-point number must be finite, and if it is +0 or 0
> then the corresponding mathematical value is simply 0.
> This use of "must" is an assertion that the *specification* never
> calls for a mathematical operation or function to be applied to an
> infinite or NaN value (so if it did, that would be a specification
> not that an implementation is required not to do so.
It would be better not to use "must" in cases like this. This is a
statement of fact about the specification, not a conformance
requirement on any conformance class. Even if there is no formal
citation of RFC2119, nontheless such informal use of "must" may
confuse experienced readers of various specifications.
More information about the Es-discuss