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

Reply via email to