Minimalist (why) classes ?

Rick Waldron waldron.rick at
Sat Nov 12 18:21:55 PST 2011

On Sat, Nov 12, 2011 at 7:08 PM, Brendan Eich <brendan at> wrote:

> snip
> Let's argue about specifics or we'll get nowhere. Do you think Irakli's
> selfish.js extend (
> is the way to
> go, or Prototype's quite different form?

Neither of them are fit for standardization. Selfish and Prototype are both
incapable of correctly "deep copying" arrays or objects, resulting in new
"instances" being able to modify values of the base object's properties if
those values are elements of an array or property values of an object -
because the array and object property themselves are references, not real

PrototypeJS is painfully obvious, Selfish requires a demonstration. I
forked/cloned the repo and added a branch with a set of tests:

The branch:

The commit:

An Object.extend() that creates an object full of references is certainly
not the way to go.


> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list