typeof extensibility, building on my Value Objects slides from Thursday's TC39 meeting

Brendan Eich brendan at mozilla.com
Sat Aug 3 16:39:07 PDT 2013

Brendan Eich wrote:
> Claude Pache wrote:
>>  Fixing `typeof` of old (null) and new value types would be a 
>> solution, but I'm rather definitely considering something like the 
>> defunct `Object.isObject()`

I forgot to add that my patch for 
https://bugzilla.mozilla.org/show_bug.cgi?id=749786 includes

Object.isObject(x) // false unless x is an object
Object.isValue(x)   // true for primitives and value objects

The idea: isObject returns true for all the new value object types and 
the reference-semantics objects found in JS today, while isValue returns 
true for all compare-by-value types, whether the legacy primitives 
(undefined, null, boolean, number, string) or the new-in-ES7 value objects.


More information about the es-discuss mailing list