js2js The Revolution In JavaScript
js2js The Revolution In JavaScript
Written by Ian Elliot   
Sunday, 17 November 2013

It's a logical step but one that people seem to have been avoiding. With JavaScript becoming the assembly language of the web, it is an obvious requirement that JavaScript should be treated on an equal footing with other languages. This really is the next big thing in JavaScript's evolution. 

 

js2jslogo

 

There are lots of compilers for languages such as C++, Java and so on that compile to JavaScript. Now a new open source project is developing js2js,  a compiler for JavaScript. 

The advantages of this new approach are so obvious that you have to wonder why we have all been so slow to take it up.  

To quote JavaScript guru Croucklas Dougford

"It feels so natural to bridge the gap between JavaScript and JavaScript. I'm wondering why nobody has ever thought of this before."
 
We decided to try it out and it is clear that the compiler is fast and efficient and remarkably small. What is more the claims of the projects website all seem to be true. The code produced is as efficient as the original and it preserves the structure not only of the original program but also of the bugs - did we mention that our code had lots of those.
 
js2jslogos
 
It not only worked perfectly with our favourite library jNoQuery but it also worked flawlessly with Vanilla JS - something that most tools struggle to do. See Vanilla JS Used On More Sites Than jQuery.
 
The compiler is a zero recursive descent parser implement in Node.js and the code is available for forking on GitHub, but the original works so well that even for an early beta it is production quality. 
 
Forget CoffeeScript, Dart, TypeScript and any other language that compiles to JavaScript, this approach make them all look like plodding eliephants compared to the lightness of touch of js2js. The next phase is probably to move js2js to the cloud and implement a distributed parallel compiler. 
 
js2jslogo

More Information

js2js

js2js Announcment

Related Articles

Vanilla JS Used On More Sites Than jQuery

JQuery Ever More Popular

Getting Started With TypeScript

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

 
 



Comments




or email your comment to: comments@i-programmer.info

 

Banner


CLion Improves C++17 Support
13/04/2018

There's improved support for C++17 in CLion 2018.1 as well as WSL support  and the addition of CMake Install.  More generally, this version shows the start of the general decoupling of the C [ ... ]



Retro Game AI Contest
07/04/2018

OpenAI has launched a transfer learning contest using the Sonic The Hedgehog series of games for SEGA Genesis. The challenge is to create the best agent for playing custom levels o [ ... ]


More News

 
Last Updated ( Sunday, 17 November 2013 )
 
 

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2018 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
Banner