Re: RFC 132 (v1) subroutines should be able to return an lvalue

[email protected] (Damian Conway) Sat, 19 Aug 2000 05:07:15 +1000 (EST)
Newsgroups perl.perl6.language.subs
Message-ID <[email protected]>
   > > But why introduce a new keyword "lreturn"?  What about something like
   > > this?
   > > 
   > > 	sub foo {
   > > 	    my $lvalue : lvalue;
   > > 	    ...
   > > 	    return $lvalue if want('LVALUE');
   > > 	}
   > 
   > Error proneness?  (Is that a word?)

It is now :-)

Besides, context can't always tell:

	bar ( foo );

Should foo return a copy or an alias?

Damian