Minimalist (why) classes ?

Axel Rauschmayer axel at rauschma.de
Sun Nov 13 01:35:15 PST 2011


Good point. Note that you can easily do the same thing without copying, via prototypes:
https://github.com/rauschma/proto-js

On Nov 13, 2011, at 3:21 , Rick Waldron wrote:

> On Sat, Nov 12, 2011 at 7:08 PM, Brendan Eich <brendan at mozilla.com> wrote:
> snip
> 
> Let's argue about specifics or we'll get nowhere. Do you think Irakli's selfish.js extend (https://github.com/Gozala/selfish/blob/master/selfish.js) 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 copies.
> 
> PrototypeJS is painfully obvious, Selfish requires a demonstration. I forked/cloned the repo and added a branch with a set of tests:
> 
> The branch: https://github.com/rwldrn/selfish/tree/test
> 
> The commit: https://github.com/rwldrn/selfish/commit/ee55af5ec00074005fa74e9d9eb4be4dc4db5163
> 
> 
> An Object.extend() that creates an object full of references is certainly not the way to go.
> 
> Rick
> 
>  
> 
> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111113/755695d6/attachment.html>


More information about the es-discuss mailing list