On Fri, Jul 18, 2008 at 2:02 PM, Allen Wirfs-Brock
<[EMAIL PROTECTED]> wrote:
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:es4-discuss-
>> [EMAIL PROTECTED] On Behalf Of Garrett Smith
>> Sent: Friday, July 18, 2008 12:28 PM
> ...
>> You're prev response seems to have come from the discussion of
>> Object.create. Object.create, with only one argument, is the same as
>> beget. The beget function makes a new object that inherits members
>> from an existing object. The rationale doc fails to make mention of
>> this.
>
> See the first complete paragraph on page 13
>
"Note that Object.create without its optional second argument is
essentially the same operation as
the beget function that was been widely promoted. We (perhaps not
surprisingly) agree with the
utility of this function but felt that the word "beget" is probably
confusing to many non-native English
speakers."

Does object.create add an object to the first argument's prototype
chain? That's not explicitly stated, and one has to hunt down Doug's
begetObject. (below)

Does the propertyDescriptor describe an object added to the front of
the object's prototype chain?

=========================================================
Object.prototype.begetObject = function () {
    function F() {}
    F.prototype = this;
    return new F();
};

Lasse Reichstein Nielsen's "clone" function, c. 2003:-
Object.prototype.clone = function () {
    function myConstructor = function(){};
    myConstructor.prototype = this;
    return new myConstructor();
 }
=========================================================
http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/0c1cc7f1cb314f8e/5d06e72e55d5bf11?#5d06e72e55d5bf11

Garrett
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to