Axel Rauschmayer (2015-01-03T02:33:17.000Z)
>> One reason it might make sense to throw, is people converting values to string names for use as object properties. Reason you'd want to throw would be to prevent accidentally making the key useless (different from its original Symbol value).
> 
> This is exactly the reason.
> 
> Of course, having String(x) and '' + x diverge is funky, but not novel:
> 
> js> o = {valueOf(){return 42}, toString(){return 'haha'}}
> ({valueOf:function valueOf(){return 42}, toString:function toString(){return 'haha'}})
> js> String(o)
> "haha"
> js> ''+o
> "42"


Playing devil’s advocate: How realistic a danger is this? Do people ever compose a property key for an object out of several pieces?

It does add a fair amount of complexity for something that doesn’t seem that common.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150103/0d3db1db/attachment-0001.html>
d at domenic.me (2015-01-12T17:52:30.363Z)
Playing devil’s advocate: How realistic a danger is this? Do people ever compose a property key for an object out of several pieces?

It does add a fair amount of complexity for something that doesn’t seem that common.