Random Perl 6 syntax rant
Ovid
publiustemp-londonpm at yahoo.com
Wed Apr 2 07:53:56 BST 2008
--- 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).
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.
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