When comparing Earl Grey vs Babel (6to5), the Slant community recommends Babel (6to5) for most people. In the question“What are the best languages that compile to JavaScript? ” Babel (6to5) is ranked 8th while Earl Grey is ranked 29th. The most important reason people chose Babel (6to5) is:
Babel will turn your ES6+ code into ES5 friendly code, so you can start using it right now without waiting for browser support.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Powerful hygienic macros
Earl Grey's macro system allows for creating powerful control structures that look just like builtin ones. EG also supports macro libraries which allows developers to provide their macros/DSLs for others to use.
Pro Pattern matching
Pattern matching is an incredibly powerful tool that, once you've tried, you cannot live without. This is not your average hacked-together pattern matching but a complete and integral feature to the language.
Pro ECMAScript 6 Asynchrony
Earl Grey provides Promises based on ECMAScript version 6 and as many NPM libraries already implement. Earl Grey also provides a promisify
function that converts old-fashioned callback-style asynchrony to promises.
Pro Fully compatible with Node.js ecosystem
Anything available on NPM can be used just as easily with Earl Grey. In fact, everything else can be used too! Earl Grey has interfaces to Browserify, Webpack, and even experimental support for SystemJS. Earl Grey can even be used to generate npm packages that any node-compatible language can use!
Pro Support ES6(Harmony)
Babel will turn your ES6+ code into ES5 friendly code, so you can start using it right now without waiting for browser support.
Pro Plugins for custom features
Pro Future forward thinking
Cons
Con Not true static typing
EG gives you the tools to implement your own type-checking inside of argument lists and elsewhere but there's no analysis done at compile-time like other compile-to-js languages.
Con Unfamiliar syntax
While the language shares a lot of DNA with Python, there are still many new (and interesting) features/sugar that may take some time to get used to.
Con Generated ES5 is ugly and performs badly
Output looks far from handwritten ES5, is quite large with a lot of extra statements to execute.