Minimalist (why) classes ?

Brendan Eich brendan at mozilla.com
Sat Nov 12 11:53:30 PST 2011


On Nov 12, 2011, at 4:38 AM, Quildreen Motta wrote:

> On 11/11/11 23:44, John J Barton wrote:
>> On Fri, Nov 11, 2011 at 4:48 PM, Brendan Eich<brendan at mozilla.com>  wrote:
>>> On Nov 11, 2011, at 4:42 PM, John J Barton wrote:
>>> 
>>>> Object.extend() does not exist.
>>> Which one do you mean?
>> I mean Object.extend does not exist.
>> 
>>> Irakli is using Function.prototype.extend, not something like PrototypeJS's Object.extend.
>> Iraki wrote Object.extend().
> `Object' is a function, though. So it shares stuff from the Function.prototype object :3

That's right. My point is that Irakli's .extend is quite different from PrototypeJS's, contrary to what John seemed to assume.

IINM Irakli has a gist that defines Object.prototype.extend, which is inherited of course by Function.protoytpe and all functions (unless shadowed or cut off via null __proto__). But this .extend is not the two-argument one that does "Swiss inheritance" (http://www.crockford.com/javascript/inheritance.html).

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111112/1badf104/attachment.html>


More information about the es-discuss mailing list