On Mon, 14 Oct 2002, [EMAIL PROTECTED] wrote:
: From: Mark J. Reed [EMAIL PROTECTED]
: > Summary of values:
: > 
: >    1/0              +Inf
: >    -1/0             -Inf
: >    0/0              NaN
: >    Inf/0            NaN
: >    Inf/Inf          NaN
: 
: Are Inf and NaN going to be standard in Perl 6?

I don't know if they're "standard", but it has to be drop-dead easy to add them.

: As long as we're traveling
: down that road, how about i (the square root of -1), or Lukasiwiscean Null?
: (Sorry if I sound sarcastic, I'm actually honestly curious.)

Obviously complex arithmetic is important to a sizable set of people, and
they want it to be fast.

: My inner Larry Wall is right now saying that there needs to be a more
: generalized solution to all this.  OK, here's one. By default, anything/0
: throws an exception.  However, you can load modules to handle those
: exceptions, substituting Inf, NaN, or whatever as the evaluation of the
: expression.

You can control how things compile in a lexical scope via pragma,
and you can control how division is implemented for a class via
overloading.  That's probably enough control to get wherever you want
without implicitly throwing and catching exceptions.

Larry

Reply via email to