On Mon, Oct 02, 2000 at 10:40:28AM +0100, Piers Cawley wrote:
> Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:
> > Unprototyped subs should not be allowed to modify their callers' data
> > simply by assigning to elements of the arg array.
> >
> > =head1 COMMENTS ON FREEZE
> >
> > This RFC generated no discussion in 3 days
I missed reading it. My fault.
> I'd just like to put in an 'ick' vote on this one. I might come up
> with something a little longer and more reasoned later, but I'm
> supposed to be writing shopping basket code.
Possibly part of the ick might be that with the current implementation plus
this, adding a prototype to foo to give sub foo($$); to allow
pass-by-reference stops you calling foo @bar with a 2 element array.
You'd now have to go &foo(@bar); which doesn't feel nice.
Subroutine attributes instead? Default to current behaviour,
use strict; and you have to specify (in some way, prototype, attribute...)
whether each function has read-write or read-only @_?
Nicholas Clark