On Wed, Dec 28, 2011 at 6:11 PM, Mark S. Miller <erig...@google.com> wrote:
> > > On Wed, Dec 28, 2011 at 5:59 PM, John J Barton < > johnjbar...@johnjbarton.com> wrote: > >> >> >> On Wed, Dec 28, 2011 at 1:15 PM, Axel Rauschmayer <a...@rauschma.de>wrote: >> >>> On Dec 28, 2011, at 17:13 , John J Barton wrote: >>> >>> Doesn't Object.keys() solve this problem? >>> >>> >>> For getting elements, yes. For setting, the problem with the illegal own >>> property name "__proto__" remains. >>> >>> >> Doesn't this same problem face any property of an object-as-dictionary >> which is also a property needed for the dictionary to work properly? So >> fixing __proto__ is not important, it's inadequate? >> > > Good uses of objects-as-stringmaps use the objects *only* as stringmaps. > Aside from the use of "hasOwnProperty" as an instance method in Crock's > original example, which he elsewhere shows how to correct, Crock's > "registry" is used correctly. Together with the proposed __proto__ as > accessor behavior, Crock's code would actually be correct (though I'd still > advise using an abstraction like StringMap that can encapsulate such > hazards and present a simple interface). > Ok, but IMO, our system needs a built-in StringMap more than it needs to fix __proto__. jjb > > > -- > Cheers, > --MarkM >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss