> 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

Reply via email to