2012/11/21 David Bruant <[email protected]> > Since the use of Object.getOwnPropertyNames may not be widespread, maybe > that making non-enumerable unique symbol properties could do the trick (as > it has with new {Object, Array, etc.}.prototype additions) > > 1bis) If all standard built-in names are private, they're not enumerated, > neither in for-in, Object.keys, Object.getOwnPropertyNames and you can have > a unique name in any of these enumeration operation if you've added them > manually, so, no backward compat (or close enough that it's acceptable in > my opinion) >
Even disregarding the proxy whitelist hassle, let's not go there. Making all the well-known unique symbols, like @iterator, private just so they don't appear in Object.getOwnPropertyNames feels silly to me. We have the distinction between unique and private symbols precisely because we've identified a need for symbols that need to be unique but not necessarily private! Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

