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

Re: Difficulties in implementation of textToInterval(s)




Dmitry and others, 

On May 21, 2016, at 09:13, Dmitry Nadezhin <dmitry.nadezhin@xxxxxxxxxx> wrote:


[…]


However, it might happen in P1788.1 with textToInterval(s) constructor.
The P1788.1 omits the text about "difficulties in implementation" and about PossiblyUndefinedOperation.
The section 6.7.4 of the suggested Level2 chapter of P1788.1 requires stricter behaviour.
It requires textToInterval(s) to fail and to return empty interval when s is not valid.
The section 6.6.2 says that an interval literal [l,u] is valid iff "l <= u".
So the operation textToInterval(s) for some inputs is more expensive in P1788.1 than in P1788.
Is it intentional project decision of P1788.1 ?

I suggest in 6.6.2 in the first item to add the text “of the same radix (10 or 16)”. The first sentence 
would read then 

A string [l,u] where l and u are optional number literals of the same radix (10 or 16) with l ≤ u, l < +∞ and u > −∞, see 4.2. 

I think this will resolve the issue with textToInterval. Would there be any objections?

Ned



 -Dima