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

Re: Motion 46: finalise interval literals, amendments



(A) I'd like that the standard defines interval literal in unambigous and portable way.
If program P1 written in language L1 writes textual file with number literals,
then program P2 written in language L2 is able to read this file.

So I like the "restriction" variant more than "host language integer literals":

>   An implementation may make language-defined restrictions on the form of
>   number literal.
>   [Example. Some languages treat leading zero as the start of an octal number.
>   They may forbid p and q of the p/q form to start with a zero.]

Also I have doubts about using host-language langNumLit, langNumLitMat, langNumLitExp, sp,
instead of clear syntax similar to 754-2008 syntax that of hexadecimal number literals.  

This is about interval literals that are used as arguments of text2interval() and as public representation.
I have nothing against extending languages and compilers by host-language specific literals.

If portable syntax of text2interval() arguments is not-a-goal then excuse me for this noise.

  -Dima