The JavaScript Alternatives - InformationWeek

InformationWeek is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

IoT
IoT
Software // Operating Systems

The JavaScript Alternatives

Three languages compete to make JavaScript easier to write and faster to execute. Which to choose?

Two and a half years ago, in discussing JavaScript's ubiquity, I projected that this trait alone would make the language the continued target of new languages and compilers. And in fact, this has happened. Many languages now offer the ability to compile to JavaScript in addition to their original principal targets.

For example, among those that also compile to native code, there are Nimrod, which we discussed last month; Fantom; and the gaming language Haxe. In addition to these, there are many standalone tools that translate code from your favorite language to JavaScript. Of these, the most famous by far is the underappreciated Google Web Toolkit (GWT), which converts Java code to JavaScript. (I say underappreciated because the tool definitely has magical aspects to it. For example, you can live debug Java code, which is mapped behind the scenes to the actually executing JavaScript.)

There is another segment of the industry, though, where a lot of action is taking place. Entrants here aim to correct the perceived shortcomings of JavaScript by either extending or improving the language and offering code-to-JavaScript compilation. The most widely known players are CoffeeScript, Google's Dart, and Microsoft's TypeScript. Their approaches are rather different, but all aim at enabling JavaScript to be used in larger projects than it was ever intended for.

The first of these languages to come to market (in 2010), CoffeeScript is probably also the most established. It borrows concepts from both Ruby and Python to reduce clutter and remove some ragged aspects of JavaScript syntax. To be comfortable with CoffeeScript, you must be willing to forgo traditional mainstream programming constructs — curly braces, semicolons, etc. — and adopt new syntactical elements like meaningful white space. Users of Python and Ruby already have partially adopted those conventions, and so it's no wonder they in particular have embraced CoffeeScript. For example, it's now part of Ruby on Rails (as of v. 3.1). And at GitHub, it's the recommended language for doing Web development.

Read the rest of this article on Dr. Dobb's.

Prior to joining Dr. Dobb's Journal, Andrew Binstock worked as a technology analyst, as well as a columnist for SD Times, a reviewer for InfoWorld, and the editor of UNIX Review. Before that, he was a senior manager at Price Waterhouse. He began his career in software ... View Full Bio

We welcome your comments on this topic on our social media channels, or [contact us directly] with questions about the site.
Comment  | 
Print  | 
More Insights
Slideshows
What Digital Transformation Is (And Isn't)
Cynthia Harvey, Freelance Journalist, InformationWeek,  12/4/2019
Commentary
Watch Out for New Barriers to Faster Software Development
Lisa Morgan, Freelance Writer,  12/3/2019
Commentary
If DevOps Is So Awesome, Why Is Your Initiative Failing?
Guest Commentary, Guest Commentary,  12/2/2019
White Papers
Register for InformationWeek Newsletters
Video
Current Issue
Getting Started With Emerging Technologies
Looking to help your enterprise IT team ease the stress of putting new/emerging technologies such as AI, machine learning and IoT to work for their organizations? There are a few ways to get off on the right foot. In this report we share some expert advice on how to approach some of these seemingly daunting tech challenges.
Slideshows
Flash Poll