Hi, Is there a plan for a "clone" function in ES4?
Object.prototype.clone = function() { function F() {} F.prototype = o; return new F(); }; The earliest reference I have found to this function is a post by Lasse Reichstein Nielsen in 2003 on comp.lang.javascript http://groups.google.com/group/comp.lang.javascript/msg/5d06e72e55d5bf11 In the past year this function has been evangelized by Douglas Crockford. http://javascript.crockford.com/prototypal.html Given the idea has persisted for at least a four year period as something useful in a prototype-based language, would a clone function be a good addition to the language itself? Peter _______________________________________________ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss