5 things I hate about Perl

jarich on 2008-05-09T02:04:40

This is inspired by brian d foy's post on "What do you hate most about your language?". Of course I love Perl. I program in it and teach it for a living. Still I hate....

  1. eval. Block eval should be spelled "try" and should have a "catch" instead of an ugly unreadable if statement following. Block eval should not be called the same thing as string eval - which is very, very different.
  2. symbolic references. You should have to *turn on* this functionality if you want it, rather than having it on by default. Trying to convince self-taught programmers who refuse to use strict because it breaks their code and don't want to know that hashes are a better solution, is a challenge in self-control every time. In fact, although I hardly ever use strict in my command-line one-liners or my temporary stuff; it shits me that strict isn't on by default.
  3. bad legacy stuff. In particular things like "reset", which makes some sense in the context of lazy programming, but which just screams out to be abused in "job secure" code.
  4. inconsistent whitespace rules.
    print $foo->{blah};  print $foo -> {blah};  print "$foo -> {blah}";
    I get why the last one fails, but why allow the second one to succeed if you can't be consistent?
  5. no way to take a slice through arrow-notation. If it wasn't for this, we could teach our students arrow notation exclusively and they'd never need to know about the uglier form of dereferencing.