Let the Airing of Perl Grievences begin!

schwern on 2007-12-24T07:36:38

Today, according to Seinfeld, is Festivus the Holiday for the rest of us. One of the rituals of Festivus is the Airing of Grievances. It consists of lashing out at others and the world about how one has been disappointed in the past year. In particular, let's lash out at Perl.

Here, I'll start.

Perl, I hate your dereferencing syntax so much.

push @{ $hash->{key} }, 42
Oi what a mess! Why can't you just put autoboxing into the core?
$hash->{key}->push(42)
Is that so hard? Your sister Ruby can do it, why do you have to be such a shlemiel?


Autoboxing,.. eah

Stevan on 2007-12-24T16:02:26

I agree the deref syntax is yuk, but I don't know if autoboxing is the answer. I actually think the direction of the pipeline with autoboxing is weird, not to mention the whole "is it returning things or modifying in place" confusion (yes, yes, obviously people would figure that one out, but both options are totally legit, so it is not always obvious which one it should/would/could be). Overall I found autoboxin' to be kinda un-Perlish myself, I prefer to just meta-program all that yuk away instead.

- Stevan

Re:Autoboxing,.. eah

schwern on 2007-12-25T02:16:53

I'm sorry, this does not appear to be a Perl grievance.

Eenhhhhh.

Aristotle on 2007-12-24T17:46:49

I don’t see why we’re being forced to write the outer deref. It could be much simpler:

push $hash->{key}, 42;

Much nicer than autoboxing, too.

There’s never any more or less of a guarantee that $hash->{key} will be an array-ref anyway, regardless of which way you write it. There's never any ambiguity there either. The current rule is just arbitrary outgrowth of the prototype brain damage. A better way to approach the problem that prototypes attack would have been to provide a prefix notation for binary operators and then declare push et al an operator.

I had hoped that autoboxing would at least give me something close to that by means of indirect object syntax:

push $hash->{key} 42; # note the missing comma

However, no dice. I can find no way to convince Perl to parse something that starts out like a plain push invocation as an indirect object method call instead. It always complains that something is wrong before it gets to the end of the expression.

Re:Eenhhhhh.

schwern on 2007-12-25T02:17:35

You were starting to get into the grievance thing at the end there.

lemme see...

jhi on 2007-12-25T01:12:56

Flattening of lists.

Stringifying of references.

Taking strings so seriously that seeing them as characters becomes hard.

Re:lemme see...

schwern on 2007-12-25T02:19:00

Jarkko's got the idea. More more!

down with "my $self = shift; "

markjugg on 2007-12-25T02:44:20

I'm tired out writing "my $self = shift".

self.pm helps some but lacks an equivalent of "shift".

Grievance number 2: The large scope of the Perl 6 spec means Perl 6 will take even longer to complete. I would prefer simpler, sooner.

Floating point sucks

waltman on 2007-12-25T04:41:55

You think I should die waiting for a result from you? I'm not so young anymore you know. OK, so your older brother C++ (he sounds like a lawyer, he makes your bubbe proud) sucks at it too, but at least he remembered to call me with his wrong, rounded off answers sometime today. Would it kill you to add some optimizations?

Sorting kvetch

waltman on 2007-12-25T05:01:32

Why can't you be more like your sister Ruby? Not only does she have autoboxing, she also has a sort_by method. Why do we still have to schlep through Schwartzian transforms like they did back in the Old Country?

Methods

chromatic on 2007-12-25T06:02:42

Why is the only difference between methods and functions at the point of call, not the point of declaration?

Ohhh! Don't get me started!

Adrian on 2007-12-27T02:13:39

Apart from said deref syntax...

* I have to worry about circular references? WTF! It's not like a decent garbage collection system is exactly cutting edge.
* Having to write use strict/warnings/-T in every damn file
* Source filters, and the deluded folk who think they are as good as Lisp macros
* SUPER being related to the package the method was compiled into. Like that makes sense.
* Depth-first method resolution by default
* The evil mushing together of namespaces and classes
* Packaging up a whole bunch of stuff for deployment by non-Perl gurus is just too damn hard
* Having core perl functions that we can't override because the prototype system won't support them
* Having to shift $self everywhere
* Meta classes? What are they then...

Off the top of my head...

Re:Ohhh! Don't get me started!

Adrian on 2007-12-27T02:23:58

Oh yeah. 1/3 is a bloody rational. Treat it like one until I tell you otherwise.

Re:Ohhh! Don't get me started!

markjugg on 2007-12-27T03:34:00

* Packaging up a whole bunch of stuff for deployment by non-Perl gurus is just too damn hard

Amen.