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
- Re: RFC 132 (v1) subroutines should be able to re... Jonathan Scott Duff
- Re: RFC 132 (v1) subroutines should be able t... Jarkko Hietaniemi
- Re: RFC 132 (v1) subroutines should be ab... Jonathan Scott Duff
- Re: RFC 132 (v1) subroutines should b... Jarkko Hietaniemi
- Re: RFC 132 (v1) subroutines should be able t... Johan Vromans
- Re: RFC 132 (v1) subroutines should be able t... Damian Conway
- Re: RFC 132 (v1) subroutines should be ab... Jarkko Hietaniemi
- Re: RFC 132 (v1) subroutines should b... Nathan Wiger
- Re: RFC 132 (v1) subroutines should b... Damian Conway
- Re: RFC 132 (v1) subroutines should be ab... Damian Conway
- Re: RFC 132 (v1) subroutines should b... Chaim Frenkel
- Re: RFC 132 (v1) subroutines should be able to return ... Randal L. Schwartz
- Re: RFC 132 (v1) subroutines should be able to re... Johan Vromans
- Re: RFC 132 (v1) subroutines should be able t... Randal L. Schwartz
- Re: RFC 132 (v1) subroutines should be ab... Johan Vromans
- Re: RFC 132 (v1) subroutines should b... Nathan Torkington
- Re: RFC 132 (v1) subroutines sho... Johan Vromans
- Re: RFC 132 (v1) subroutines should be ab... Damian Conway
- Re: RFC 132 (v1) subroutines should b... Johan Vromans
- Re: RFC 132 (v1) subroutines sho... Chaim Frenkel
- Re: RFC 132 (v1) subroutines... Johan Vromans