Maciej Stachowiak wrote:
Perhaps when catchalls are considered for ECMAScript, there could b a way to encapsulate the specific pattern of index access, so you can have magical getters and setters for all index properties (integer numbers in range to be an array index) without having to install a full catchall for all properties.

That's what ES4 did.  The a[b] operator could be overridden by an object, as 
could for-in iteration.  Hence you could implement array-like things 
(multidimensional in the case of ES4 because it also understood a[b,c,d]) 
without doing catch-alls.

This seems like an attractive avenue, especially since we now have some ES5 
methods that reliably access underlying properties.

   Waldemar
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to