List Info

Thread: Re: The Problems of Perl: The Future of Bugzilla




Re: The Problems of Perl: The Future of Bugzilla
country flaguser name
United Kingdom
2007-05-13 08:02:18
At 2007-05-12 10:08:02+0000, "Aaron Trevena"
writes:

> IME that isn't true. Mitigating for Python's poor error
reporting,
> Ruby's poor performance and or reinventing wheels in
Ruby are costly.

A number of people have mentioned the quality of error
reporting as a
strike against Python.  Can any of these people provide a
concrete
example of what they are talking about?  With source code,
and a
misleading or confusing error message?

I've never had any problem understanding or using Python
error
messages.  They're much like Perl errors: you get an error
message, a
code location, and a backtrace.  Sometimes one wants a
little more
information in order to make a full diagnosis, so for one
Python
project I wrote a tiny utility to get backtraces with local
variable
values, which I can then print out and put in the
application log
file:

<http://www.ravenbrook.com/projec
t/p4dti/master/code/replicator/stacktrace.py>

The fact that I develop most of my Python with a command
line to hand,
in which I can type pdb.pm() at any point to grovel around
the code
and data with the debugger, makes Python errors very much
easier for
me to deal with than Perl ones.  I dare say there are
command line
tools analogous to this, built in to Perl, but I've never
found them.

Nick B

-
To view or change your list settings, click here:
<http:
//bugzilla.org/cgi-bin/mj_wwwusr?user=bondyahoo.com>

Re: The Problems of Perl: The Future of Bugzilla
user name
2007-05-13 10:24:35
On 13/05/07, Nick Barnes <Nick.Barnespobox.com> wrote:
> At 2007-05-12 10:08:02+0000, "Aaron Trevena"
writes:
>
> > IME that isn't true. Mitigating for Python's poor
error reporting,
> > Ruby's poor performance and or reinventing wheels
in Ruby are costly.
>
> A number of people have mentioned the quality of error
reporting as a
> strike against Python.  Can any of these people provide
a concrete
> example of what they are talking about?  With source
code, and a
> misleading or confusing error message?

...because I keep a file of such things to hand.. not ;)

from memory :
>>
syntax error at Line XXX
common.something
<<

> I've never had any problem understanding or using
Python error
> messages.  They're much like Perl errors: you get an
error message, a
> code location, and a backtrace.

Except in Perl I'll get a whole lot more, such as 'expected
foo' or
'unexpected foo' or 'undeclared bar' or 'runaway quote at
line xxx',
and even warnings like '= in selection at line xx'. Perl
will always
give a good indication of what the error was in the syntax,
python IME
will not.

as for debugging.. did you ever bother to are tee eff em?

perldoc perldebug recommends reading perldoc perldebtut and
gives the
very simple example of :  "perl -d -e 42"

Kinda makes sense, perl -e do evaluate, perl -w to warn,
perl -c to
compile, so very arcane, not ;)

A.

-- 
http://www.aarontrevena
.co.uk
LAMP System Integration, Development and Hosting
-
To view or change your list settings, click here:
<http:
//bugzilla.org/cgi-bin/mj_wwwusr?user=bondyahoo.com>

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )