[OT] Perl woes
Peter Corlett
abuse at cabal.org.uk
Thu Jan 29 13:43:23 GMT 2009
On 29 Jan 2009, at 03:06, Avleen Vig wrote:
> Peter Corlett <abuse at cabal.org.uk> wrote:
[...]
>> (My complaints about Python are in other annoying corners of the
>> language.)
> Just curious, what else annoys you?
What I don't like:
The most obvious one is that it treats white space as significant and
uses it to indicate scope. Editors eat it, it gets mangled in transit,
and it doesn't have the sanity check of requiring matching
parentheses, which catches all sorts of exciting typos. I have the
same criticism of YAML.
Python package documentation is crap. CPAN modules are also often
badly-documented but the custom is to give an example or two with each
method call, which is much more helpful than a few paragraphs of prose
saying the same thing. Python's examples are in a section at the end,
and are too scant to be useful except for trivial cases.
Python relies too much on run-time checking. In Perl, I can "use
strict" and it'll spot cases where I've typoed a variable name, put
the wrong sigil on, and a few other cases that occur when tired.
Python doesn't have "my" and will happily compile code where I've
tried to get the tenth element from a hash, and only crash when I
exercise that code path, if I'm lucky. __slots__ helps catch more at
run-time, but I'd prefer compile time, please.
What I *do* like:
Function calling convention. The choice between positional and keyword
arguments, language-provided check on argument validity, and the
separate *args / **kwargs parameters that allow for Perl-style
function calls if necessary.
Python code *is* clean to read, and does skip some unnecessary
parentheses. This is slightly at odds with my criticism of it using
whitespace for scoping.
Iterators, generators and all that jazz.
More information about the london.pm
mailing list