Hi,
Juerd wrote:
> The next thing I thought was: hey, argument *passing* is actually
> *binding* to variables in the sub, so why not use the := operator?
> That works very well, because binding as an expression makes no sense
> anyway, it being a language thing. And luckily, named arguments are
> also a language thing, so that works out:
I disagree about binding only being a language thing:
# Happened to me in Perl 5 today
sub foo ($long_parameter_name) {
return 42
if (my $short := $long_parameter_name) == $specialcase;
...usual processing with $short...
}
push @foo, (my $head := pop @grtz);
(my $alias := $long_name).grtz();
# etc.
(Unless of course, you consider this to be obfuscation.)
--Ingo