Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

[email protected] (Chaim Frenkel) 18 Aug 2000 00:29:10 -0400
Newsgroups perl.perl6.language.subs
Message-ID <[email protected]>
Then assignment is the gatekeeper?

But what information will the lvalue sub have for deciding what to
make lvaluable?

<chaim>

>>>>> "DC" == Damian Conway <[email protected]> writes:

DC> And I keep pointing out that this is only one aspect of lvalue subroutines.
DC> The point of an lvalue subroutine is not to make assignment to the return value
DC> work, it is to make the return value an *lvalue*. That's a much more general
DC> thing, because it allows every other type of modification to work too.

DC> The lvalue accessor *shouldn't* be doing the assignment (what if an assignment
DC> isn't what I want?).

DC> The (overloaded) operator = should do the assignment. To whatever lvalue
DC> the lvalue subroutine returns.

DC> Or the "assignment" should be done by operator += or operator++ or
DC> whatever mutator I'm actually applying to the returned lvalue.


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