domenic at domenicdenicola.com (2013-07-23T17:39:36.297Z)
On Mon, Jul 15, 2013 at 12:24 PM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> Regarding, typeof. The right way to look at it is that the set of results
> that correspond to non-object types will be fixed and includes only
> ("undefined", "null", "number", "string", "boolean"). All other typeof
> values correspond of objects (where an object is a value that support the
> ES internal MOP).
I'm very surprised to see "null" in this list, and not "function" -- a
typeof typo I hope?
On Mon, Jul 15, 2013 at 12:24 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote: > > On Jul 15, 2013, at 8:35 AM, André Bargull wrote: > > Allen (cc-ed) changed symbols back to objects in draft rev 16 ( > https://bugs.ecmascript.org/show_bug.cgi?id=1546#c2), so I guess > Object(x) will still work in ES6 to test for object types. > > > Correct, Symbols as primitive values were just causing too many issues. > Essentially, everyplace in the spec. that needs an object had to be > updated to explicit deal with Symbols. That certainly isn't a pattern we > want to follow in the future if add new "value types" such as bignums. It's > much cleaner to freeze the set of primitive types and make all future value > types (including Symbols) objects. just as it would have been even cleaner > if everything was an object and there were not "primitive types". > > Regarding, typeof. The right way to look at it is that the set of results > that correspond to non-object types will be fixed and includes only > ("undefined", "null", "number", "string", "boolean"). All other typeof > values correspond of objects (where an object is a value that support the > ES internal MOP). > I'm very surprised to see "null" in this list, and not "function" -- a typeof typo I hope? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130715/ec3a24fd/attachment-0001.html>