On Tue, Aug 16, 2005 at 10:00:14AM -0700, Larry Wall wrote:
: If we go with class names being the undefined prototypical values,
: and if we assume that NaN is an "unthrown exception" variant of
: the undefined value for object types like Num, then we might even
: end up with Num == NaN, albeit with different exception information
: hidden inside.  Num is "not yet defined", whereas NaN is "tried to
: convert 'hello' to number at inflate line 2" or some such.

I forgot to point out that you naturally lose that extra exception
information when you store a Num into a num.  Whether that warns or
throws an exception or is silent is likely controlled by pragma.
People doing complicated things with large matrices might prefer
silence, whereas people doing scalar ops will usually prefer to know
that something went wrong sooner, and not have to backtrace through
the code to figure out where the NaN was generated.  But maybe most
of that naturally falls out of the num/Num distinction, since num
will mostly be used in compact arrays.

Larry

Reply via email to