The Problems of Perl: The Future of Bugzilla

Aaron Trevena aaron.trevena at gmail.com
Sun May 13 17:48:59 UTC 2007


On 13/05/07, Nick Barnes <Nick.Barnes at pobox.com> wrote:
> At 2007-05-13 15:24:35+0000, "Aaron Trevena" writes:
> >
> > from memory :
> > >>
> > syntax error at Line XXX
> > @common.something
> > <<
>
> OK, that's from your memory.  Now this is from Python itself:
>
> $
> $ python bugzilla.py
>   File "bugzilla.py", line 46
>     def init(self, db, $config):
>                        ^
> SyntaxError: invalid syntax
> $
>
> What's unclear about that?  Note the handy caret, indicating the
> offending character at which Python's lexer (understandably) barfs.  I
> can't parse your "@common.something" line.  Is that supposed to
> resemble part of a Python error message?

@common.threads is where this particular python application barfed. I
didn't see anything obvious, otherwise I might have looked at it a bit
more instead of finding something that didn't require upgrading or
debugging to work.

"Syntax Error : invalid syntax".. priceless *LOL* ... as opposed to
valid syntax causing a syntax error? ;)

> > 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',
>
> Are these syntax errors? ('runaway quote' is, of course).  Python, of
> course, has gloriously simple syntax, so syntax errors are fairly
> unusual in the first place, and are almost always trivial to fix.

That's incredibly subjective. I find Python opaque, you find Perl not
too difficult and not to your taste.

> Other errors (e.g. runtime exceptions) are reported comprehensively in
> Python.

That's helpful, as compilation doesn't catch undeclared variables or whatever.

> Python certainly has many faults (for instance, I think that the
> indentation syntax is a mistake; also it doesn't have strong static
> typing, simple syntax for higher-order functions, or a type-safe
> module language).  But error reporting really isn't one of them.  And
> if we start discussing syntax errors in this thread, we are bound to
> end up in a discussion of syntax itself, and Perl fans might prefer to
> avoid that line of argument.  Perl, by design, puts complex
> functionality into the syntax.  Python, by design, keeps the syntax
> simple and consistent and puts functionality into library modules.

Again. Subjective.

Perl is concise, flexible and powerful. I'm no smarter than the
average guy, but I never found any problems with Perl's syntax and
haven't found it confusing.

I lilke Perl's syntax, you hate it - don't pretend this is technical
when it's not.

> > as for debugging.. did you ever bother to are tee eff em?
>
> Please try to be less offensive.  Of course I've read the manual.

Well you said you didn't know how to debug.

  Of
> course I've used perl -d.  In fact I end up using this rather cranky
> tool every single time I write any code for Bugzilla, because getting
> the twisty Perl syntax correct, even for something trivial, takes me
> four or five attempts.

Then try and learn the language properly - you can go to classes -
really, it's quite simple to learn. Your problem sounds more like mine
- I find Python so opaque and contrary to what I'm familar with from C
based languages that I just don't bother - on the plus side I don't
whine about it and slag it off on python project lists, and certainly
don't reccomend people not to use it just because of my personal
feelings towards how it does things.

A.

-- 
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Hosting



More information about the developers mailing list