Re: @@toStringTag spoofing for null and undefined

2015-02-10 Thread Claude Pache
Le 10 févr. 2015 à 06:40, Gary Guo nbdd0...@hotmail.com a écrit : Sorry for not noticing the change. It seems the ES6 spec changes the behavior of *.prototype object. In ES5, *.prototype is itself a * object. However, because in ES5 Object.prototype.toString.call(String.prototype) will

RE: @@toStringTag spoofing for null and undefined

2015-02-10 Thread Gary Guo
`({[Symbol.toStringTag]: 'String'})` could be identified as string as well, use the legacy method. ES6 guarantees that legacy code will work, but it does not ensure that legacy code could work well with new codes that intended to create a fake string. Subject: Re: @@toStringTag spoofing for

Re: @@toStringTag spoofing for null and undefined

2015-02-10 Thread Claude Pache
You misunderstood me: I wasn't referring to interaction between legacy and new code, but to legacy code by itself, e.g. on an unmaintained site, that used to work and would suddenly break (hint: unknown object was specifically `String.prototype`). —Claude Le 10 févr. 2015 à 13:16, Gary Guo

Doing more with template strings

2015-02-10 Thread Mark S. Miller
Now that template strings are widely deployed, I think they're being underused. To get the ball rolling, ... From https://github.com/erights/quasiParserGenerator: We present a proof of concept template string tag for generating template string tags. See below for why this is only a proof of

Re: @@toStringTag spoofing for null and undefined

2015-02-10 Thread Brendan Eich
This is indeed a change from ES5. Has any major engine or other test-vehicle tried to see how web-compatible it is? /be Caitlin Potter wrote: I believe making String non-exotic has been discussed, and if this has changed from ES5, it could be related to that.

ES7 property initializers

2015-02-10 Thread Benjamin (Inglor) Gruenbaum
Looking at the syntax from here: http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#es7-property-initializers ES7+ Property Initializers Wait, assigning to properties seems like a very imperative way of defining classes! You're right, however, we designed it this way