On May 14, 2005, at 11:32 PM, Adam wrote:
Maybe you like to make rediculous assumptions for no reason. I don't recall saying perl's flexibility was bad, or is this a canned response you use anytime anyone critisizes perl, without bothering to read what they said?
I was simply countering the "Perl OO is awkward" argument that I tend to hear from Java and Python developers. Their beef is that OO Perl is awkward because it doesn't follow the "canned classes" aspect. My apologies if this isn't your complaint; you didn't specify. Perhaps you'd like to expound on what it is about OOP that troubles you so?
Perl's ugliness lies in things like requiring you to explicitly declare variables as local scope and having subs to take a single array instead of letting you declare args, and then using an ugly hack to try to work around the problem instead of just fixing it. Or is that stuff adding lots of flexibility that I am unaware of? Seems ruby manages to be just as flexible as perl without having stupid stuff like this, doesn't it?
What about declaring a variable in the block it's being used is so difficult for you? It's pretty simple... define a variable in the main namespace, it's a global. Define it in a block, it's lexical. Of course, you always have closures and Exporter at your disposal as well.
I don't quite gather why you think declaring args to a sub is any more advantageous than passing args via @_. And yes, this can be a benefit when you might not need to pass all the args at any one time.
Last I checked, that link listed a number of positive features found in Perl (not just PHP shortcomings).
Maybe you should check it again then. It lists 6 problems with PHP,
and simply states the obvious fact that perl (like pretty much every
language besides PHP) doesn't have these problems. Or do you think "PHP
has no lexical scope" is a positive feature of perl?
Heh, I guess I hate PHP so bad that the lack of those problems *feels* like a benefit to me. It would be nice to see a matrix comparison of those items between the languages we've discussed. I'm certainly not the person to compile it though.
Sounds to me like you're still making rediculous assumptions based on what you want to read, rather than what I wrote.
I'd hardly call them ridiculous assumptions. I'm simply trying to carry on a constructive discussion.
If you're so excited about Python, Ruby and Pike, perhaps you'd like to document why they make better *scripting* languages. I believe that's what this thread is really about.
Except that I am not so excited about them. If you bothered to read, you would notice I said they are "just as good" as perl. You're the one that feels the need to defend perl from vicious attacks like "everyone has PCRE". I simply pointed out that perl is not special, and he could use other, easier to learn languages that are just as good as perl.
I never insinuated that you made a vicious attack. I'm simply responding to your points in order. The thread started out with the OP inquiring as to why Perl was a good scripting language, and I responded in kind. I think we can bring this OT thread to a close, or at least carry it off-list.
-- Jason Dixon DixonGroup Consulting http://www.dixongroup.net