In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Abigail) writes: >On Wed, Nov 20, 2002 at 11:42:43AM +0100, Bart Lateur wrote: >> On Wed, 20 Nov 2002 04:10:02 -0600, Steven Lembark wrote: >> >> >sub commify >> >{ >> > my ( $max, $sep, $end ) = ( shift, shift, shift ); >> ... >> >} >> >> Wow! Hold it! Am I the only one who finds this absurd? More than one >> shift on the same array in one single expressing, sounds like bad style >> to me. Comments? > >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".
It forces the reader to think about associativity and order of evaluation. If you've been bitten by unexpected outcomes before you might have to try it to make sure it does what you think. I've used shift, shift before, so I already know. But it would be unfair to foist on a junior maintenance programmer, IMHO. -- Peter Scott
