ECMAScript:Harmony / ES6到JavaScript编译器 [英] ECMAScript:Harmony / ES6 to JavaScript compiler

查看:216
本文介绍了ECMAScript:Harmony / ES6到JavaScript编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读彼得关于JavaScript的文章后,我注意到了


Brendan Eich说,Harmony的目标之一是为JavaScript编译器提供更好的目标。

Brendan Eich stated that one the goals for Harmony is to be a better target for to-JavaScript compilers.

目前有两个流行的编译器有一些模糊的 ES:Harmony 合规性:

There are currently two popular compilers with some vague ES:Harmony compliance:

  • Traceur
  • CoffeeScript

虽然CoffeeScript有一些合规性,但它并不是一个ES:Harmony编译器,因此对此没有用处。

Although CoffeeScript has some compliance it's not designed to be an ES:Harmony compiler so it's not useful to this end.

Tracuer似乎更加严格地遵守ES:Harmony规范,但我不知道它是否打算成为一个完整的ES:Harmony编译器。

Tracuer seems to be sticking more rigorously to the ES:Harmony specification but I don't know whether it intends to become a full ES:Harmony compiler.

要编译ES6到ES3它还需要支持ES5功能(和可能一个开关,无论是编译ES5到ES3或ES6到ES3)。

Since the aim is to to compile ES6 down to ES3 it would also need to support ES5 features (and probably a switch whether to compile ES5 to ES3 or ES6 to ES3).


  1. 目前是否有任何其他项目旨在创建一个完整的ES:Harmony到ES3编译器?

  2. 开始写这样一个编译器知道标准是年轻/不稳定/不稳定是明智的。

  3. 目前有ES5 - ES3编译器? =

  1. Are there currently any other projects aiming to create a full ES:Harmony to ES3 compiler?
  2. Is it wise to start writing such a compiler knowing that the standard is young / unstable / in flux.
  3. Are there currently any ES5 -> ES3 compilers?

/ traceur-compiler-discuss / browse_thread / thread / 2974b8ed9705110c> Traceur邮件列表。

I've left a question on the Traceur mailing list.

这样的编译器的目的是向后兼容ES3。 ES3中ES5和ES6的完全仿真。

The aim of such a compiler would be backwards compatibility with ES3. Not full emulation of ES5 and ES6 in ES3.

推荐答案

连续实现大多数相关功能,应该运行在es3浏览器(如旧的IE)。

Continuum has implemented most of the relevant features and should run in es3 browsers (like older IEs).

这篇关于ECMAScript:Harmony / ES6到JavaScript编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆