Hi guys, I have a question about the implementation of the Object.extend (<= v1.6).
Can you (very) briefly discuss the tradeoffs between the following two approaches and the motivation for choosing the first one for the framework. Thank you. Regards, GC =========== Approach 1 (current) ===== Object.extend = function (a, b) { for (var c in b) { a[c] = b[c]; } return a; } --------------------------------------------------------------- =========== Approach 2 =========== Object.extend = function (a, b) { var E = function() {}; E.prototype = b.prototype; a.prototype = new E(); a.prototype.constructor = a; return a; } --------------------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---