On Aug 3, 2013, at 9:03 PM, Brandon Benvie <bben...@mozilla.com> wrote:
> > > On Aug 3, 2013, at 8:25 PM, Brendan Eich <bren...@mozilla.com> wrote: > >> Value objects are non-extensible, no-own-property (so effectively frozen), >> compare-by-value objects. > > So, importantly, only one of the two existing commonly used tests for > 'objectness' will continue to work correctly in the face of value objects. > The first being a test that typeof is "object" or "function" that's not null, > will continue to work. The second `Object(value) === value` would no longer > work because a value object will return itself from `Object`. This brings up another question I hadn't thought of: the interaction between value objects and WeakMaps. A value object with an overridden strict equality comparison (is this on the table for builtin types?) can't be WeakMap keys probably. _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss