Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: textToIntevsal(s) and exceptions



On 2015-03-18 11:22:09 +0000, John Pryce wrote:
> A big change when moving text from the set-based flavor to the
> "all flavors" part is that one must answer what I think of as
> meta-questions: what does the standard require/permit a flavor
> to require/permit?
> 
> Above, I agree with Vincent. Here's another:
>     What shall be said about the syntax & semantics of decorated interval 
>     literals in *all* flavors? 
> 
> I think the standard should
> - *Require* the sx_sd form to be used by all flavors.
>   That is, if sx and sd denote interval x and decoration d in the flavor 
>   then sx_sd shall denote x_d, provided this is a valid combination in 
>   the flavor.

I'm not opposed, but I'm not sure that this is really necessary
in practice. A "should" may be better since we are not sure about
the usefulness and the consequences.

> - *Permit* other forms, such as "nai".

Yes.

> Please comment on this, also on the promotion bare->decorated
> question and the reverse, demotion.
> 
> I think the standard should forbid demotion, but this may be my prejudice.

I think that it should only be a recommendation on flavors.

BTW, in an implementation supporting only common intervals, demotion
doesn't seem to be a problem since there's no ambiguity.

> For promotion I'm undecided, and wait for advice from language experts.
> If it's part of the standard, does that make it different at implementation
> level, from making it a consequence of library design and language features,
> e.g., by using class inheritance?

Do you have an example?

> If 1788 *permits* promotion, I think it should *require* that a bare interval 
> literal sx with value x be promoted to x_d with d=newDec(x) (at Level 1).

Yes, probably.

> BTW, do we say anywhere that any interval x in any flavor shall be
> decoratable? I.e., there is at least one d such that x_d is a
> permitted combination?

Isn't it a consequence of newDec(x)? I mean that if d = newDec(x),
then x_d must be a permitted combination.

-- 
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)