Right now String(symbol) throws because it uses ToString which is spec'ed
to throw.

I'm suggesting that we special case String(value) to do a type check for
Symbol and return the same string as Symbol.prototype.toString.call(value)
does.

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-string-constructor-string-value

The motivation for this is that String(value) is pretty explicit and was in
ES5 a safer way to stringify something than value.toString().

-- 
erik
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to