On 04/29/2015 03:10 PM, Jonas Sicking wrote:
But has anyone reached out to the JS
team and let them know that we really need let and yield in workers to
see if A is an option?
This is the reaching-out stage now* :). When I filed bug 1151739 the
only impacted app was the email app, and that was for a long-lived
branch that is unlikely to be merged for >3 months. FxOS Calendar is now
undergoing refactoring/cleanup in an iterative fashion where a
long-lived branch is not required/desired and so the issue is forced.
F) Just use the Babel transpiler for now for workers at the cost of not
being able to provide feedback to the JS engine in cases where it's not
practical to flip the preference. Many FxOS apps already use AMD-style
module loaders that support loader plugins
(http://requirejs.org/docs/plugins.html) that support both dynamic
transpiling and optimized build-time transpiling, and one exists for Babel
already (https://github.com/mikach/requirejs-babel).
I don't have a sense for how much extra work this is for you guys, so
I don't have a strong opinion either way on this.
It's not particularly a lot of extra work; all the tooling exists
already. My main concerns would be:
- Arguably it's better if we're using SpiderMonkey's ES6 features that
are already in there so we can help find and file bugs, etc.
- There will be a temptation to use fancy proposed ES7 features like
async/await, potentially resulting in the code never actually being pure
ES6 code. (And ES7 transpilers are a gateway transpiler to
coffeescript/dart/etc!. ;)
Andrew
* I trust the JS team reads dev-platform and I think dev-tech-js-engine
would potentially leave out other important voices.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform