At 02:00 PM 8/22/00 -0600, Tony Olekshy wrote: >Peter Scott wrote: > > I actually see nothing wrong in division returning undef for a > > dividend of 0. It's just as easy to check as doing an eval. > >Please don't do this. I would have to check every divide in all >my code, since no fatal is the default! Leave the current version >of Perl's best guess as to what it should die on alone, unless >use fatal is in scope. Consider this: > > $amount_i_owe_you = $gross_amount / $discount_rate - $paid; > >If $discount_rate is accidentally undef and $paid is $100, then the >$amount_i_owe_you is now -$100. I don't see my cheque yet ;-) But surely you have to be consistent. I understood Chaim's point to be that he wanted no exceptions if he didn't ask for them. If the core currently dies where it could return and set $!, then it is being inconsistent, since this is not an error that prevents perl from continuing. How can Chaim or anyone else write a program and know that it won't die if we allow such things to continue? I suppose we could have a use Fatal qw/legacy/ Yuk. -- Peter Scott Pacific Systems Design Technologies
- Re: On the case for exception-based... Tony Olekshy
- Re: On the case for exception-b... Glenn Linderman
- Re: On the case for exception-b... Tom Christiansen
- Re: On the case for exception-b... Glenn Linderman
- Re: On the case for exception-b... Tony Olekshy
- Re: On the case for exception-b... Tony Olekshy
- Re: On the case for exception-based error ha... Tony Olekshy
- Re: On the case for exception-based error handling. Markus Peter
- Re: On the case for exception-based error handling. Peter Scott
- Re: On the case for exception-based error handli... Tony Olekshy
- Re: On the case for exception-based error ha... Peter Scott
- Re: On the case for exception-based erro... Tony Olekshy
- Re: On the case for exception-based... Peter Scott
- Re: On the case for exception-b... Tony Olekshy
- Re: On the case for exception-b... Bennett Todd
- Re: On the case for exception-b... Peter Scott
- Re: On the case for exception-b... Bennett Todd
- Re: On the case for exception-b... Peter Scott
- Re: On the case for exception-based error handli... Chaim Frenkel
- Re: On the case for exception-based error ha... Tony Olekshy
- Re: On the case for exception-based erro... Tony Olekshy