develooper Front page | perl.perl6.language.errors | Postings from August 2000

Re: On the case for exception-based error handling.

Thread Previous | Thread Next
From:
Peter Scott
Date:
August 22, 2000 13:40
Subject:
Re: On the case for exception-based error handling.
Message ID:
4.3.2.7.2.20000822133404.00b9d230@psdt.com
At 02:29 PM 8/22/00 -0600, Tony Olekshy wrote:
>Peter Scott wrote:
> >
> > 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.
>
>But, for simple scripts, Perl's inconsistency I just what I like.

Never thought I'd hear you say that :-)

>I'm not sure, but I think Chaim's main point was just that, not
>that divide-by-zero should be ignored too.

Well, it could be made user-selectable, right Bennett?  Do you envisage 
being able to say

         use Fatal qw(Arithmetic IO etc)

using classnames that fall out of RFC 80?  Therefore the default (to get 
the current behavior) would be that some of the classes had Fatality 
enabled and others didn't?

That would at least document and expose the ugly inconsistency :-)

> > How can Chaim or anyone else write a program and know
> > that it won't die if we allow such things to continue?
>
>What we allow doesn't matter.  No-one can write a program and know
>that it won't die, unless all the code pre-checks or traps every
>++$i that might cause an integer overflow.

--
Peter Scott
Pacific Systems Design Technologies


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About