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

RE: Python or Perl for a Debian maintainance project?

Matthias Urlichs wrote:
> Python.
> My main reason for this statement, entirely subjective but based on
> personal experience: 
> Every error whatsoever throws an exception. That's far better from a
> quality POV than to check the error return of _every_single_statement_,
> because (a) nobody actually programs that way, and (b) if you actually
> do program that way your code will be twice as long and ten times as
> unreadable. 

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.

> Check out [1]ESR's experience, it pretty much matches mine.
> [1] http://www.linuxjournal.com/article.php?sid=3882

In his article, Eric asks the question "what has [Python] got that Perl does not?".  But essentially, he only criticizes Perl's syntax ("readability") and absent compactness ("there's more than one way to do it"), and even that is debatable.

Reply to: