Hey all,

I just read a bit about the ParallelJS project, Typed Objects (StructType) and was curious if I could implement bindings for v8 today.

Link to wiki document: http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects


I realized that I don't know what to do if someone has code like this:

typeof uint8; // "undefined" in ES5

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?


*My ideas so far:*

Why not offer something like "use es6"; to offer the same behaviour in supported environments? Are there any plans for such a thing? JIT implementors could then easily trace if the code was built for ES6 and optimize their static code analysis heuristics.

I mean, "use strict" is pretty cool, but it has the problem that it will be available among multiple future versions. "use es6" would be an identifier a JIT can validate against a specification directly.

Also, you could solve the typeof null; problem with such a thing without invalidating legacy code.


Cheers,
~Chris
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to