On 23.11.2011 23:14, Brendan Eich wrote:
On Nov 23, 2011, at 10:29 AM, Dean Landolt wrote:

Object.prototype.count =>  total keys
Once upon a time, SpiderMonkey supported __count__ (acted like a readonly 
accessor on Object.prototype but masqueraded as own in objects delegating to 
O.p), whose value was the number of enumerable properties.

Just a small note: besides, __count__ can be supported w/o for-in enumeration each time per reading this accessor -- via proxies (from my old experiments: Python's "magic __names__" inc. __count__ -- https://gist.github.com/617338).

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

Reply via email to