> DC> Urgh. If you want lazy eval, say so explicitly: > > DC> sub somesub (?@) { > DC> my @foo = @_; > DC> } > > Where do you want the lazy specified -- on the caller or the callee? > Or should it be available to both? (and of course the opposite > eval{}, to make it evaluate the arguments immediately.) The RFC I'm writing specifies that if the subroutine being called has a lazy context specifier on a given argument, that argument is only evaluated when the value of the corresponding element of @_ is fetched, stored, or eval'd. So the subroutine that's being called is the one that decides. But, of course, lvalue subroutines give you the ability to impose the choice externally as well. If you need to pass a lazy argument to a normally non-lazy subroutine, you could just write: sub enervate (?$) : lvalue { $_[0] } And then: non_lazy( a(), enervate(b()), c() ); Damian
- Re: RFC 73 (v1) All Perl core ... David L. Nicol
- Re: RFC 73 (v1) All Perl core ... Steve Simmons
- Re: RFC 73 (v1) All Perl core ... Dan Sugalski
- overloading assignment operato... David L. Nicol
- Re: overloading assignment ope... Dan Sugalski
- Re: RFC 73 (v1) All Perl core func... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Nathan Torkington
- Re: RFC 73 (v1) All Perl core ... Dan Sugalski
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Bart Lateur
- Re: RFC 73 (v1) All Perl core ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... David L. Nicol
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions sho... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core functions should return ob Hildo Biersma