>> Maybe the argument doesn't matter anymore with
>> Dean's new revelation.
>
> I don't think so. Subclassing Array still isn't the same as
> extending the Array prototype. It allows to work with
> extended Arrays, but the creation is different. You cant
> create an array via bracket-syntax ([1,2,3].)

Dean just published and it isn't widely tested to find out the pitfalls. I
wouldn't start doing anything that depends on it in jQuery core until it's
been thoroughly investigated.

If it pans out, I think the big advantage would be in creating a new Object
whose prototype could be modified without affecting the base Object in the
primary namespace. So the prototype lib could create its own base Object and
be compatible with normal code that doesn't expect a polluted Object. 

It doesn't eliminate the need a lot of the internal jQuery fixes like
treating Array, NodeList, and Arguments as array-like objects or working
around Safari reporting NodeList as a function. It may create more problems,
because the new objects will have different constructor properties and
a.constructor!=Array for example. 


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to