Strawman: Decouple [ ] and property access

Axel Rauschmayer axel at rauschma.de
Thu Nov 10 17:20:25 PST 2011


> I've posted a new strawman proposal for the ideas originally discussed in this thread.
> 
> http://wiki.ecmascript.org/doku.php?id=strawman:object_model_reformation 

Feedback:
- I like contrasting the concept “application data domain” with the concept “program definition domain”. Maybe mention that earlier.
- Typo: “Updated WeapMap and Map Interface”
- Mention best practices: when to use what (might have time until an actual implementation).

StringKeyedMap.prototype. at elementGet = function(k) {return this. at backingStore[k]}
=> That is still the “an object as a programming construct” style (include prototypes) and not the “an object as a collection” style (only own properties).

Possible change (with a yet-to-be-defined method Object.getOwnProperty()):
StringKeyedMap.prototype. at elementGet = function(k) {return Object.getOwnProperty(this. at backingStore, k)}

I’m not sure how one can best keep the two styles apart, perhaps @elementGet should use Object.setProperty() instead of square braces.

-- 
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/20111111/26c9ca14/attachment-0001.html>


More information about the es-discuss mailing list