>> I see two domains for the concept of “own” properties: >> 1. Meta-programming. >> 2. Using objects as dictionaries. > > Thanks, good to focus on use-cases. Both would like shorthand and freedom > from Object.prototype.hasOwnProperty tamper-proofing. > >> Isn’t #2 the majority (at least as far as non-library-programmers are >> concerned)? Will the concept become less relevant once we have David >> Herman’s dicts? > > We don't know how dicts will fare. Making progress with for own does not > interact badly with dicts if we spec them to be for-in'able -- for own (k in > d) for d a dict should work, just as for objects.
Ah, shame. I had hoped that a good dictionary implementation would largely make the notion of own properties obsolete (except for #1 use cases). Bringing inheritance into the collection mix seems problematic. That’s why I like Allen’s “data-only-[]” proposal. I agree with “not interact badly” if there are indeed other use cases. -- Dr. Axel Rauschmayer a...@rauschma.de home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss