Nathan Torkington wrote:
>
> > Then I think both of these should act exactly the same:
> >
> >     somesub(@values);
> >     somesub = @values;
> 
> EUGH.  No way!
> 
> Assignment should be used to reflect (get this) assignment.  Using
> it as argument passing is disgusting.  I'm assuming you're not
> *advocating* this, merely pointing out that it's a side-effect of
> the RFC's suggested implementation.

Not in this ridiculously trite example, no. It's silly and stupid. And
misleading.

However, chaining together lvalue subs is a very useful shortcut:

   @output = ($title, $x, $f->xml_extract) = <FILE>;

Agreeably, this is not a 1:1 on the assignment front. But I'd like to be
able to do this. "Disgusting" is a matter of taste. :-)

As for the other arguments about "magical $LVALUE" stuff, I'm firmly
against those. I am 100% behind the RFC - everything should go into @_.
I just think the above is a useful extension that shouldn't be
overlooked. It's really powerful.

-Nate

Reply via email to