Re: RFC 149 (v1) Lvalue subroutines: implicit and explicit assignment

[email protected] (Chaim Frenkel) 24 Aug 2000 14:42:30 -0400
Newsgroups perl.perl6.language.subs
Message-ID <[email protected]>
>>>>> "PRL" == Perl6 RFC Librarian <[email protected]> writes:

PRL> Therefore, the definition of the return function must be changed
PRL> such that it is lazy.

PRL> Additionally, the definition of assignment must not normally
PRL> evaluate a lazy expression, but rather evaluate it to the point
PRL> where its value would become the value of a B<variable>, and then
PRL> assign to that variable.  If the expression cannot be evaluated
PRL> to that point, (for example, C<$x+3>), then it may be an error to
PRL> assign to it.

If I understand you correctly the actual target of the assignment
would be delayed.

Which leads me to ...

	{
	  my $foo = lvalue_with_lazy_return;

	  $foo = 42;
	}

I wouldn't want the 42 going, who knows where. I want the value of $foo
replaced with 42.

<chaim>
-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
[email protected]				               +1-718-236-0183