Re: RFC 132 (v1) subroutines should be able to return an lvalue
[email protected] (Chaim Frenkel) 20 Aug 2000 00:57:21 -0400
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <[email protected]> |
Perhaps foo should be lazily evaluated. Then the want would return the correct usage. Though once the value is returned, it should stay that way on all subsequent usages until the call stack is unwound. <chaim> >>>>> "DC" == Damian Conway <[email protected]> writes: >> > Besides, context can't always tell: >> > >> > bar ( foo ); >> > >> > Should foo return a copy or an alias? >> >> want() obviously needs an additional parameter: how deep to go >> back in the call stack. Which begs also for a way to find out how >> deep is the call stack. DC> That wouldn't help in this case, since it's a matter of whether the DC> programmer intended to pass by copy or alias here, and that isn't encoded DC> *anywhere* on the call stack. -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183