July 30, 2003

Christ on a Pogo Stick

I'm a programming dilettante at best, i.e. I can learn any language real fast as long as I don't have to write anything more complicated than Hello World. This means that I prefer lighter languages with less syntax so I can pick 'em up faster. That's why I've never gotten around to picking up Perl, the language with more syntax than you can shake a stick at (that's not even including the abomination that is regular expressions, which is such a big Perl feature). As if the unholy number of operators in Perl 5 isn't enough, Perl 6 is poised to add even more cruft on top of that. I think this Slashdot comment said it best:

You have { } for blocks, and for automatically parameterized blocks (ie. anonymous functions).

You have =, := and ::=, ~=, ~~, .... = does assignment, := does binding and ::= works at compile time and is normally used to define types and such, ~= is pattern matching, and I have no idea what ~~ does.

You have the new <== and ==> pipeline operators. They are dataflow operators. Like so:

$foo ==> my_func ==> $bar;
is the same as
$bar <== my_func <== $foo
is the same as
$bar = my_func($foo);
is the same as ...

You already had the $,@,%,& to prefix variables with.

You have more uses for * now, as in slurpy arrays and splicing. As in, the * can make an array parameter slurp up all the remaining arguments, or it can make an argument flatten into a list of arguments.

They've added some wierd << foo >> syntax that I didn't even bother to read about as I was in syntax shock.

They've added ^ which indicates that a variable in a block is actually a parameter and therefore the blocks is actually a parameterized blocks (ie. anonymous function). So, now you can't tell if something surrounded by { }'s is just a block of code or whether it's an anonymous function. Although, I don't think this is a problem as it's usually obvious from the context.

Um, fuck that.

Posted by mikewang on 08:56 PM