On 20 Nov 2002 at 13:43, Moran, Matthew wrote:
> Abigail wondered:
>
> > Why is that bad style? Many times when people say it's bad style,
> > it's just a case of "beauty is in the eye of the beholder".
> >
>
> Strikes me that instead of using one move to assign the variables, it's
> using three.
Just so. If the *intent* of the code is to remove the first three elements
from @_ and assign them to variables[*] isn't the clearest way to express the
intent just to do:
my ($a, $b, $c) = splice (@_,0,3)
It seems to express the *exact* semantics desired [remove the elements from @_
and assign those to the vbls), and to my eye does it more clearly than (shift,
shift, shift) does.
[*] NB: this has *different* semantics than doing my ($v1, $v2,
$v3) = @_ -- I'm assuming here that the modification to @_ is
actually necessary [if not, then it is not bad form on syntatic
grounds, but because it is doing something unnecessary and
potentially confusing].
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
mailto:[EMAIL PROTECTED] Pearisburg, VA
--> Too many people, too few sheep <--