On Mon, Nov 14, 2011 at 10:42 AM, Rick Waldron <waldron.r...@gmail.com> wrote:
>
>
> On Mon, Nov 14, 2011 at 11:48 AM, John J Barton
> <johnjbar...@johnjbarton.com> wrote:
>>
>> [snip]
>>
>> Sorry I don't understand. Every function which accepts object
>> references and embeds its arguments in [[Prototype]] (either in the
>> return value or the instance created from the return value)  faces the
>> copy-ish problem.
>
> This is a negligent conflation.

Ouch, that sounds really bad! Except I don't understand what you mean ;-)

> Pass by reference is not the same as
> ensuring that when extending one object with another, the resulting object
> is not implicitly capable of mutating its source objects (as is the case in
> Selfish).

I don't understand this sentence. I guess you mean: "The issues of
extend() is not related to pass by reference vs pass by value."  If
so, I disagree.

If extend() only allows object literals as arguments then you don't
have to copy, deep or shallow.  That's how syntax like Allen's <|
avoids the copy problem.

But extend() can't limit its arguments to object literals. So it must
deal with copy. Am I wrong?

jjb
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to