Murat Ünalan wrote:
Then you're just not thinking in enough simultaneous dimensions:
my int ($pre, $in, $post) is constant
= (0, 1, 2 );
This could been written faster in a single line, without decorating with
extra newline+tab+tab+tab+tab:
It's source code. Four extra keystrokes is a negligible price to pay for the
clarity gained.
could be in real world application for making statistics about average
age of webshop users:
my Customer('WebShop') AGE ( $john, $james, $jim, $tony ) = ( 42, 77,
32, 34 );
And that shows precisely why Perl 6 does it the other way. Prepending extended
properties like that makes the declaration almost unreadable. Because it
separates the properties from the variables they qualify. Expecially compared
with:
my AGE ( $john, $james, $jim, $tony ) is Customer('WebShop')
= ( 42, 77, 32, 34 );
Besides which, multiple variables like this are almost always exactly the
wrong solution. Especially for statistical applications.
You really want:
my AGE %customers = ( John=>42, James=>77, Jum=>32, Tony=>34 );
Damian