typeof null

Axel Rauschmayer axel at rauschma.de
Tue May 8 19:11:33 PDT 2012

> No. I would rather an upgrade for typeof, than something that tries to do two different things under one API.

Are those two things so different, though? Most people only need to know about the difference between primitive values and objects, because of typeof and instanceof.

If the “new typeof” is to be about classifying primitives and distinguishing primitive values from objects then I would make it return "object" for all non-primitive values (including functions).

Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120509/98752551/attachment.html>

More information about the es-discuss mailing list