Oliver Hunt (2014-07-29T19:17:45.000Z)
domenic at domenicdenicola.com (2014-08-04T23:45:42.062Z)
On Jul 29, 2014, at 12:02 PM, Christoph Martens <cmartensms at gmail.com> wrote: > This code will be valid in an ES5 environment, because uint8 is an undefined reference/variable. But as uint8 is a built-in value type, what should happen in an ES6 environment? uint8 is not a value of type uint8, it's the name of the type itself so presumably it will return "object" or some such (i haven't read structural type spec yet). Anyway, this typeof check is used to identify support for the API rather than anything else. I'm also opposed to adding yet another mode switch, as just "use strict" has added complexity throughout JSC, and has minimal benefit. This would have even less benefit than that, I think the problem here is that you're assuming a lot more static inference than actually occurs - JS is a dynamic language so most performance/correctness work is performed dynamically as it is unavoidable.