According to the current version of the ES6 spec [1], `Symbol(desc)`, when 
`desc` is not `undefined`, coerces its argument to a string and uses it as a 
description for a newly created symbol. In particular, if `sym` is a symbol, 
`Symbol(sym)` throws a TypeError (it can't be coerced to string).

Intuitively, I would expect that `Symbol(sym)` just returns `sym`, just like 
`Number(num)` returns `num`, or, more generally, just like `Primitive(x)` casts 
its argument to the corresponding primitive.

What do you think?

—Claude

[1] https://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-description
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to