[EMAIL PROTECTED] wrote: >From: Michael G Schwern [EMAIL PROTECTED] > > >>This came up at YAPC::Europe. Someone [1] wanted to know if 1/0 >>would produce a divide by zero error in Perl 6, or if it would >>return a value representing an indeterminate result (undef?) >>It would make more sense for Perl, upon being given a simple bit >>of impossible math, to return undef (like other functions do on >>failure) than to generate an error. The error seems a throwback >>to earlier days of hardwired calculators. >> >> > >The problem with returning undef is that undef numifies to zero. > Why can't it return "undef but +Inf", or "undef but NaN" for 0/0, which would then cause a warning/error/nothing, as required by pragma, following the "0 but true" that has been discussed previously.
Normal numification would presumably propogate the "undef but +Inf" value. R. -- Richard Nuttall Invisible Networks DDI: 01954 206361 Tel: 01954 200002 Mob: 07798 528923 Fax: 01954 206360 Web: www.invisible.uk.net