typeof extensibility, building on my Value Objects slides from Thursday's TC39 meeting
bbenvie at mozilla.com
Sat Aug 3 21:03:26 PDT 2013
On Aug 3, 2013, at 8:25 PM, Brendan Eich <brendan at 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`.
More information about the es-discuss