-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[EMAIL PROTECTED] (Abigail) writes:
> On Mon, Oct 08, 2001 at 11:38:16PM +0100, Charlie Stross wrote:
> >
>> However, note the implicit use of @_ in shift. Yes, this behaviour is
>> documented in the Camel book. But the use of implicit arguments is still
>> confusing to beginners at some stages (presumably not by the time they're
>> getting heavily into sorting algorithms). I'd be a bit happier if it was
>> written as:
>>
>> sub fisher_yates_shuffle {
>> # Takes a single parameter, a reference to an array
>> my $array = shift @_;
>
>
> I strongly object to that. Default parameters are there for a reason.
>
> my $argument = shift;
>
> is a Perl idiom. Please do not try to dillute that.
We're two.
This construction (shift alone) is also present in bash (IIRC). So,
this is not something exclusive to Perl.
- --
Godoy. <[EMAIL PROTECTED]>
Solutions Developer - Conectiva Inc. - http://en.conectiva.com
Desenvolvedor de Solu��es - Conectiva S.A. - http://www.conectiva.com.br
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>
iD8DBQE7wkBmEzC+baSjBiURArZKAKCHf6OF2JQ6Ey29CbDVI6P4qUbdEwCeLVwo
lAzhfB1SfyB3IB+u/0cjjE0=
=og+o
-----END PGP SIGNATURE-----