Tuesday, October 18, 2011

11 programming trends to watch - 2


Programming trend No. 2: JavaScript is not just for JavaScript anymore
The JVM isn't the only cross-platform solution open to all comers. JavaScript, the langauge your kid sister uses to add an alert box to her band's website, is not just for JavaScript coders any longer. The list of languages that cross-compile to run on the fancy, just-in-time JavaScript engines is even longer than the list that runs on the JVM.
Take Google Web Toolkit. You write Java code like you're writing for the Swing framework from the '90s, and the GWT compiler turns it into JavaScript that runs in a browser on a desktop, smartphone, or tablet. There's no need for a Java applet plug-in or JVM on the client because JavaScript in the browser offers machine independence.
One of the newer arrivals is CoffeeScript, a shorthand language that's compiled down to JavaScript by inserting all the punctuation that scripting-language users hate to type. The idea is so popular that there are already CoffeeScript spin-offs like Coco, Parsec-Coffee-Script, and Contracts-Coffee-Script, each of which adds its own sophisticated metaprogramming structures to make it easier to spin out elaborate code.
Some extensions are so successful they've almost become languages unto themselves. Think of all the Web developers banging out workable code with jQuery, without remembering or knowing anything about JavaScript scoping.
If that's not enough, there are experiments linking pretty much any language to JavaScript, including Ruby, Python, Lisp, Scheme, Haskell, and OCaml.

No comments: