Damian Conway <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Randal L. Schwartz) writes: > > > So is that something we've agreed, that lvalue subs are *always* > > scalars? That'd mean we can move on to the various implementation > > details. :) > > Err, I for one would like to see *any* data types lreturn-able. So do I. But, as Randal pointed out, there seems to be a catch here. With the "scalar lreturn" proposal the sub definition does not need something special (like an :lvalue attribute) and, more important, the compiler need not know whether a sub call might involve an lvalue returning sub, or a sub that chooses to actually do an lreturn. A sub is not lvalued by declaration, it may return an lvalue if it decides to do so. All other proposals I've seen not only require special attributes and/or parameter specs for the subroutine definition (which is not a problem per se), but also seem to require that the compiler knows it's compiling an lvalue sub call, and hence this sub must be predeclared or otherwise made known to the compiler. A sub is lvalued or not, and the compiler must know. And this seems to be virtually impossible when method calls are involved. -- Johan
- Re: RFC 132 (v1) subroutines should be... Damian Conway
- Re: RFC 132 (v1) subroutines should be abl... Damian Conway
- Re: RFC 132 (v1) subroutines should be... Chaim Frenkel
- Re: RFC 132 (v1) subroutines should be able to return a... Randal L. Schwartz
- Re: RFC 132 (v1) subroutines should be able to ret... Johan Vromans
- Re: RFC 132 (v1) subroutines should be able to... Randal L. Schwartz
- Re: RFC 132 (v1) subroutines should be abl... Johan Vromans
- Re: RFC 132 (v1) subroutines should be... Nathan Torkington
- Re: RFC 132 (v1) subroutines shou... Johan Vromans
- Re: RFC 132 (v1) subroutines should be abl... Damian Conway
- Re: RFC 132 (v1) subroutines should be... Johan Vromans
- Re: RFC 132 (v1) subroutines shou... Chaim Frenkel
- Re: RFC 132 (v1) subroutines ... Johan Vromans
- Re: RFC 132 (v1) subroutines ... Chaim Frenkel
- Re: RFC 132 (v1) subroutines ... Johan Vromans
- Re: RFC 132 (v1) subroutines ... Chaim Frenkel
- Re: RFC 132 (v1) subroutines shou... Damian Conway
- Re: RFC 132 (v1) subroutines should be able to ret... David L. Nicol
- Re: RFC 132 (v1) subroutines should be able to return a... David L. Nicol
- Re: RFC 132 (v1) subroutines should be able to ret... Johan Vromans
- Re: RFC 132 (v1) subroutines should be able to... Tom Christiansen