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).
Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss