Random Perl 6 syntax rant
Paul Makepeace
paulm at paulm.com
Wed Apr 2 11:22:03 BST 2008
On 4/2/08, Ovid <publiustemp-londonpm at yahoo.com> wrote:
> --- Simon Wistow <simon at thegestalt.org> wrote:
>
> > Yet every example we see looks alien and unfamiliar - the edge cases
> > seem to be the norm.
>
>
> No, that's just because no one complains about things which they're
> familiar and comfortable with (or have wanted in Perl 5 for so long
> that they wouldn't complain about it).
There's plenty in perl 5 we're familiar and comfortable with but
generally would like to see gone: this is one of the fundamental
drivers of change, in languages and out.
Also, new things inspire in us fascination and excitement, presumably
when you first encountered perl, for example :-)
> my $cold = 3;
>
> sub f2c ($temp) { return ( $temp - 32 ) * ( 5 / 9 ) }
>
> if ( f2c($some_temp) > $cold ) {
> say "$some_temp is really cold";
> }
>
> Simple. Straightforward. No one complains (some parens above are
> optional and you can cheerfully leave them in with no problem).
>
> When people complain, they're usually complaining about new things.
When I learnt python I didn't find myself complaining a great deal...
I think Andy's point is one I would've made if he hadn't beaten me to
it - once you pass almost everything by reference a lot of this sigil
stuff somewhat Goes Away. Occasionally it's nice to be able to write
stuff like "my %tag = map {$_ => 1} $tag;" but it's an infrequent,
naughty pleasure at the best of times.
**
Probably the main issue here is that a lot of these complaints about
perl 6 occur due to brief exposure to radically unfamiliar syntax, and
without the context of any preceding instruction or discussion. I
remember skipping thru the python book and midway through seeing a
whole heap of __this__ and __that__ and thinking 'ewww'. But now I
understand the context & rationale it's fine. I suspect the same would
be true of perl 6.
**
(I also think Ben's comments about how much perl 6 ends up in
production is spot on. Unless perl solves the deployment issue it'll
continue to be eaten alive by PHP and other 'easier' languages.)
P
> Cheers,
> Ovid
>
>
> --
> Buy the book - http://www.oreilly.com/catalog/perlhks/
> Perl and CGI - http://users.easystreet.com/ovid/cgi_course/
> Personal blog - http://publius-ovidius.livejournal.com/
> Tech blog - http://use.perl.org/~Ovid/journal/
>
More information about the london.pm
mailing list