Why stick to JavaScript
Since JavaScript seems to conquer the world, all technologies associated to it, like Node.js have started to rise up too. All intermediate languages, including TypeScript
, CoffeeScript
, ClojureScript
, and Google’s Dart
have set as goals to make it easier to write applications in JavaScript. A few important reasons of why to prefer JavaScript are presented below, as introduced by Here to stay: 4 reasons to stick with JavaScript.
1. Writing code directly in JavaScript will get you far more of an audience
JavaScript code can be adopted broadly very easily. On the other hand, writing in an intermediate language will end up targeting a more specific – not that big – audience. In addition, writing directly in JavaScript can be appreciated by JavaScript newbies. The vast majority of resources for learning, writing, debugging, and implementing JavaScript all focus on the core language and not one of its intermediate targets.
2. The intermediates aren’t that popular to begin with
Intermediate languages are only used by the 22 percent of JavaScript developers, as showed by a recent survey. CoffeeScript was the most popular of all, but still, it cannot be compared to jQuery
. Another survey placed Javascript in top 10 languages, while CoffeeScript and other intermediate languages are not even in top 100.
3. Next iteration of JavaScript aims to provide many features offered by intermediates
As developer Matt Greer noted in a recent blog post, many functions found in CoffeeScript, like arrow functions or object literal shorthands, are planned for the next release of JavaScript. So, JavaScript keeps evolving well.
4. Third-party JavaScript libraries can add much of the missing functionality
Third-party libraries written for JavaScript have extended its functionality and syntax. For example, jQuery
is used broadly, it’s battle-tested, and it adds a great deal of flexibility to the way things can be identified and manipulated through JavaScript. Args.js
is another example, that provides support for optional and default function parameters. So, since JavaScript provides native extension, there isn’t as much need to switch to a whole new language to employ it.
To sum up, if a developer is comfortable with CoffeeScript or any of the other intermediate languages, that’s more than enough reason to stick with it. But the future of JavaScript as a whole – its evolution as a language and the ecosystem around it – also guarantees such measures won’t be as vital to making the most of JavaScript as they might once have been.