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

Re: P1788 input/output



On 2013-07-23 11:24:51 -0400, Michel Hack wrote:
> Vincent Lefèvre replying to my response concerning exactToInterval() etc:
> > > This is possible only if the recoverable representation includes type
> > > information.
> >
> > No, in either case, you don't need to record type information.
> 
> The "possible only" applied to your suggestion of reporting an error
> when recoverableToInterval() was used with the wrong target type.

I didn't suggest to report an error in such a case. Only in the case
where exact representation would be used.

> >   (just like when he uses a function, he needs to know the prototype).
> 
> In good programming environments the compiler or linker would complain
> about a mismatch.

This is not always possible (see variadic functions in C).
And some languages like C are not strongly typed: if you use

typedef int my_own_integer;

the compiler or linker can't see the difference between int and
my_own_integer, because my_own_integer is just an alias for int.
You can't create a real new "int".

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