typeof null

Brendan Eich brendan at mozilla.org
Tue May 8 16:32:31 PDT 2012


Constants? We don't need no stinking constants! :-P Manifest strings, a 
la typeof, are the natural and self-describing upgrade path, if we're 
talking typeof (see Subject).

The Reflect namespace object is part of direct proxies, also populated 
in SpiderMonkey (not web-facing) by Reflect.parse to get an AST for a 
given source string. We could indeed put type-reflecting method(s) there 
but I'm loath to add manifest constants. What's wrong with strings?

/be

Axel Rauschmayer wrote:
> That is, it would map primitive values to Primitive.* constants (or 
> something similar, e.g. from a reflection API) and objects o to 
> o.constructor.


More information about the es-discuss mailing list