>
> It is safer to use a Map but it is not more convenient. I expect to
> continue seeing people using object literals and mixing properties for
> things like option objects for a long time to come.
Sure, but with objects-as-maps, you're not interested in "encapsulating"
the keys. It's moot.
>
> Right, and using GUIDs is just slightly better than this. The only thing
> it does it provide uniqueness, who's value is mainly in inheritance to
> prevent collisions in private fields. My experience is that inheritance is
> usually done shallowly and these collisions are rare and obvious when they
> happen.
>
I think you're mischaracterizing the point of uniqueness. The value of
uniqueness lies in the fact that you can design protocols without having to
globally coordinate on property or method names. (E.g. iterator)
{ Kevin }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss