At 17:46 +0200 98/06/12, Jerzy Karczmarczuk wrote:
> a. The code should be as short as possible. Inserting specific code which
>    treats infinities in many places is not a good idea.
> b. The infinities (and NaNs) *should* bomb, and never propagate.
>So, I agree with Hans Aberg that in such a case an exception is an exception,
>and not a value to be processed by the (standard) user code.

  In my view, exceptions are not errors, but statements of a situation that
cannot be directly handled: The exception handling decides if it was an
error (like a NaN) or normal, like in a type accepting 1/0.

At 02:47 +1000 98/06/13, Fergus Henderson wrote:
>Well, to extend my idea a bit further: for floating point, you could
>easily have two different floating point types, one for ordinary
>numbers, and one which can hold either ordinary numbers or infinities.

  So Fergus is right, these should be different types, but I figure it will
be too difficult for a PL to classify all uses of say a "divide-by-zero"
into legal types: For example, the use of 1/0 in a higher dimensional
projective type is rather different from the one Fergus suggests in
dimension 1; so one could probably not use that type for describing higher
dimensional projective types.

  So it seems difficult to foresee what interpretation different types of
exceptions might have when constructing new types: It is better attempting
to classify these exceptions so that users can build the new types they
need, rather than trying to build off-the-rack one-size-fits-all types.

  Hans Aberg
                  * Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>



Reply via email to