JavaScript as a Runtime


The future is here, and JavaScript (JS) is everywhere, but JS development is so hard that many people prefer to develop in other languages and then compile their code to JS, using JS as a universal runtime. Here are the most interesting options:

GWT

GWT stand for Google Web Toolkit, but now it’s in hands of the community and extensively used in many corporations. GWT compiles Java into JS and it’s strongly optimized. I use it a lot, and I feel very productive using an advanced IDE like Eclipse with tools like code assist, refactor, etc.

https://developers.google.com/web-toolkit/

CoffeeScript

A very compact language, inspired by Ruby and Python and that has become extremely popular in the last years. I’m not very familiar with the “Syntactic sugar” and I’m more productive with traditional languages (yes, I love curly backets! {}).

http://coffeescript.org/

Haxe

If you are an ActionScript developer (Adobe Flash), this is your language. It not only compiles to JS and ActionScript, also to PHP, C++, C#, etc. It’s becoming popular for the development of multi-platform mobile games with NME.

http://www.haxe.org/

Dart

This is a new language for the web pushed by Google. It tries to be a “modern and structured” language for the web that can be run directly into the browser, but to retain compatibility (and to run in other browsers that publicly rejected Dart), it can also be compiled to JS.

http://www.dartlang.org/

List of languages that compile to Js: http://altjs.org/