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

Re: text2interval again, was Re: Another thought Re:..



On 2013-03-06 09:22:23 -0800, Richard Fateman wrote:
> On 3/6/2013 9:06 AM, Vincent Lefevre wrote:
> >On 2013-03-06 10:18:12 -0600, Ralph Baker Kearfott wrote:
> >>Again, please excuse me if I am missing the point. However, if an
> >>implementer wanted to provide an extension while there is a
> >>consensus that text2interval should check the input format carefully
> >>to allow, say, only forms corresponding to floating point inf-sup or
> >>perhaps also mid-rad, couldn't the implementer provide a function
> >>other than text2interval?
> >Yes, but it would not be portable, whereas text2interval() could be
> >used in a portable way, even on extensions, e.g. together with the
> >inverse function.
> >
> >>However, this brings up the question of how strongly text strings
> >>should be specified, since valid representations differ between
> >>different higher-level computer languages.
> >This is only a problem with literals.
> >
> I think that the programming language community has addressed such
> issues ad nauseam under the subject "serialization"  which one can
> read about (for example) on wikipedia.  If you can serialize
> numbers, you can serialize intervals.   (arguably
> therefore you don't need text2interval)

This is not the same subject. Serialization is about writing
structured data to files. For literals, this is about writing
intervals directly in the source code, e.g. a = [1,2].

BTW, text2interval is just the inverse of serialization.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)