Re: Common interval literals
On 2015-03-17 10:16:42 +0000, John Pryce wrote:
> Vincent, Dmitry, P1788
>
> On 23 Feb 2015, at 15:32, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> > Line 6: "The bare interval denoted by a bare interval literal of a
> > flavor is its value (as a bare interval literal). Any other string
> > has no value in that sense." is unclear. One can guess the meaning,
> > but I think that this is not well specified. I wouldn't talk about
> > the value of a *string* since it is just the sequence of characters.
> > Similarly, line 7, instead of "a string is called valid or invalid
> > (as a bare interval literal)", I would say: "a bare interval literal
> > is called valid or invalid". What I mean is that one can have:
> >
> > * A string, which is just a sequence of characters.
> >
> > * A bare interval literal, which is a string with some defined
> > interpretation: as a bare interval. A bare interval literal
> > may have a value (= is valid), which is a bare interval, or
> > not (= is invalid).
> >
> > * A decorated interval literal, which is a string with some
> > defined interpretation: as a decorated interval. Similarly,
> > a decorated interval literal may have a value (= is valid),
> > which is a decorated interval, or not (= is invalid).
> >
> > * A number literal, [...]
> >
> > * An integer literal, [...]
> It now says a *string* is valid or not *in a context*.
The problem is that this can easily be confused with the validity of
a string in the language, for instance whether a string has invalid
UTF-8 sequences or not. This difference can matter concerning the
exceptions InvalidOperand and UndefinedOperation. This should be
clarified.
Moreover the use of "valid" is no longer consistent:
* Page 29 line 24: "shall be valid interval literals"
("valid" can now be removed).
* Page 31 line 6: "a valid string is one that after conversion [...]"
but the context is unclear. This sentence could be rephrased
without using "valid", so that...
I wonder whether the notion of validity in a context should be
removed. For instance, one can say "an interval literal" for a
valid string in an interval literal context.
> Line 24: "Each flavor defines a set of portable... literals".
> Should it not be "Each flavor *shall define*..."? This looks like a
> requirement the standard puts on each flavor.
Perhaps. However it seems an obvious requirement. I mean that
a flavor would be ambiguous if it didn't define such a set.
> Line 26: "support a more general form of valid interval literals"
> I removed "valid" as being redundant.
Yes, see above.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)