>> I see two domains for the concept of “own” properties: >> 1. Meta-programming. > Could you expand on the use of `own' properties for meta-programming? I'm > afraid I can't really envision it =/
Whenever you copy properties from one object to another one, you are usually doing meta-programming (unless you use an object as a dictionary). >> 2. Using objects as dictionaries. >> >> 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? > I would think most of the cases where objects are used as dicts would be > solved by using `Object.create(null)', today on ES5-compliant engines. Except > for the nasty, nasty `__proto__' on engines that use that magic, but then you > can proxy property access/assignment. It's quite ad-hoc, but works. > > The dicts proposal looks nice though. Modulo what Allen is proposing for [] to keep program domain and data domain separate. Then dicts can actually get a size() method. -- 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