[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python or Perl for a Debian maintainance project?

On Thu, Feb 19, 2004 at 05:26:18PM +0100, Matthias Urlichs wrote:
> Hi, Julian Mehnle wrote:
> > That's true, but there's no reason not to use exceptions in Perl.  They're
> > even built-in, although you eccentrically (or shall I say, exceptionally)
> > raise them with `die`, and catch them with `eval {}` -- and yes, that *is*
> > efficient.  As syntactic sugar, you may want to use the CPAN module
> > "Error", though.
> I thought so once, too.

> The problem is that this is not a standard Perl
> idiom,

That's very wrong.

> therefore it's not all that well tested, and lots of little niggly
> difficult-to-reproduce bugs (reference counting, error reporting, et al.),
> still lurk in the corners when you do any kind of non-local exit.

That's frequently unrelated (exit would have the same problems). There
are some subtle issues with global destruction still in 5.8.

> And yes, I have Perl bugs open about that.

Can't see any.

> NB, a second problem is that eval{} catches everything. Usually,
> that's not what you want to do.

Which is why you have Error and Exception::Class.

  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature

Reply to: