At 10:33 PM 8/9/00 +0000, David L. Nicol wrote:
>Dan Sugalski wrote:
>
> > Both the l and rvalues will need to participate.
>
>
>Sorry.  Quick review of how C++ does it indicates that
>selecting an assignment operator from the lvalue's methods
>makes sense.

Sure, and using the rvalue makes sense too, in some circumstances.

>Since we have dynamic typing, there's nothing keeping an
>assignment method from running through a set of things it
>would like to be assigned, and interrogating the rvalue to
>see if it can provide them.

Yup, that's true. More work than I'd like to do by default in general, but 
a small subset's not out of order.

>But is there really an advantage, or is it just a neat trick?

What, to a smart assignment? Sure. It means we can have efficient hash and 
array assignments, since they won't need to flatten. It means that if 
Damian gets his higher-order things going we can have assignment defer 
assignment. It means that we can maybe do 'smart' data copies (or not).

It allows a lot of possibility. Whether any are worth making real is 
another issue entirely. :)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to