This post originated from an RSS feed registered with Ruby Buzz
by Daniel Berger.
Original Post: Two things I don't like about Perl
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
When you're feeling blue about your own language selection, what could be more fun than to put down another language in order to make yourself feel better? Nothing! Except maybe doing it while drinking.
I'll skip Scala for the moment. Too easy.
Let's start with btilly's I Hate Context rant, mostly because I agree with him 100%. Context is one of those evil things that you think is cool at first, and then you start to realize what a colossal headache it is. He sums it up pretty well:
Perl's notion of context requires that we think about what we want to do in array and scalar contexts, and potentially do different interesting things. This automatically doubles all APIs. Now it is true that sometimes there is something useful you can hang on this hook. But in my experience it is more often true that nothing really is obvious. And in that case with depressing frequency you get design decisions that age poorly.
And when you double the API, you double the amount of stuff that I, the end user, have to remember. Perl 6, with the plethora of operators and functions and other doodads they've added, each of which do different things based on context, will be completely overwhelming to all but the most dedicated users.
Next up is Perl's crappy inspection. Man, it pains me to see Ovid torture himself with this sort of stuff. Look ma, Object#inspect! Or, if you're feeling really frisky, there's always pretty_print.
On a side note, I was thinking the other day about how Perl reminds me of a language that Richard Berg would have designed if given a chance. For those that don't know who Richard Berg is, he's a game designer notorious for creating games that are laden with heavy rule sets (often badly written) combined with lots of charts. The upshot is that most of his games strive for realism at the expense of anything resembling reasonable game flow (or fun) because you're constantly having to reference the rules.