More Perl hate

[prev] [thread] [next] [lurker] [Date index for 2003/09/13]

From: Simon Cozens
Subject: More Perl hate
Date: 17:57 on 13 Sep 2003
Peter da Silva:
> The syntax is awkward, overcomplex, has too many obscure special
> cases (there's to many obvious examples to list, I'll just mention
> one of the obscure ones: the way scalars and collections in for
> loops are treated)

People will now jump in and tell you that, no, it's all wonderfully regular
and it does what you mean. To which I say:

Consider:
    package X;
    sub new { bless {}, shift }
    sub add { my $self = shift; new X::Y (@_); }

    package X;
    sub new { bless {}, shift }

    package main;
    X->add(foo => "bar");
versus
    package X::Y;
    sub new { my $class = shift; bless { @_ }, $class; }

    package X;
    sub new { bless {}, shift }
    sub add { my $self = shift; new X::Y (@_); }

    package main;
    X->add(foo => "bar");

The syntax is *exactly the same*, but the effect of "new X::Y" is
way different. No DWIM here. Why the hell Larry decided that being 
like C++, of all God-forsaken languages, was a good idea in this
instance is completely beyond me, especially give how much it fucks with
the language.

-- 
Going to church does not make a person religious, nor does going to school
make a person educated, any more than going to a garage makes a person a car.
There's stuff above here

Generated at 14:02 on 01 Jul 2004 by mariachi 0.52