JavaScript War: Prologue

This entry is part 16 of 19 in the series Programming Languages

Be strong young Jedi. This war will begin shortly. You can try to keep you jdk under your pillow, but the html5 will hit you in the middle of the night. And a knife in the dark will rise from shadow: JavaScript

In the last years, a lot of things happen. Let me try to organize them, so you will be prepared, young jedi

Javscript is gaining a strong momentum. JQuery, Node.js are peak example of what you can do with this old language.

  1. With JavaScript you can write strong rich client (old news) very easily using JQuery (good news). JQuery guys also added the QUnit testing framework.
  2. With JavaScript you can write server-side software (bizzare news, yesterday, quite the norm now).
  3. With typeface.js you can embed custom fonts in your web pages so you don’t have to render text to images. Quite impressive because it works so well
  4. Envjs is a simulated browser environment written in javascript. it was originally developed by John Resig (JQuery Guy)
  5. John Resig also make a Processing,js, which shows how do graphical visualization easily

On June,  Microsoft said it will optimize Windows8 for HTML5 but not for .NET/Silverlight:

[…]the new Windows 8 touch-friendly immersive style would use a developer platform not based on .NET, which Microsoft has been championing for the past decade. Instead, it would use HTML5 and JavaScript.[…]

Bad news for all that Silverlight learning, isn’t?

So seems to me you can do a plenty of new things in JavaScript, even launch a java applet :)

Java JDK 1.6 has already inside a Rhino Javascript engine. It is quite old, but it is “for free”.
Java JDK 1.7 introduced a new set of bytecodes for optimizing dynamic languages. And guess what? Rhino Javascript engine included in JDK 1.7 is the “pathfinder” for this  new feature. So not only JDK 1.7 has Javascript, but it is even optimized with ad hoc bytecode!

Experimental features are:

 

The War begins

Google needs to establish a very optimized  client side language. This memo shows Google will try to push JavaScript from two side:

  • the Ecma specification side
  • building a new language called Dash
We read:

Javascript has fundamental flaws that cannot be fixed merely by evolving the language. We’ll adopt a two-pronged strategy for the future of Javascript:

– Harmony (low risk/low reward): continue working in conjunction with TC39 (the EcmaScript standards body) to evolve Javascript

– Dash (high risk/high reward): Develop a new language (called Dash) that aims to maintain the dynamic nature of Javascript but have a better performance profile and be amenable to tooling for large projects. Push for Dash to become an open standard and be adopted by other browsers. Developers using Dash tooling will be able to use a cross-compiler to target Javascript for browsers that do not support Dash natively.

So what we will see in the next year? Hard to predict! But now every browser you can download for free, has a very dynamic optimized  language in it. Javascript will be the next “write onece, run everyware” language. But instead of a clear defined type system, Javascript offers functional-closure and high GUI integration.

Is this an evolution from 1995, or it is a U-turn? Stay tuned…

Series NavigationFunctional Programming In Depth, part II:Python and Scala retrospectionDart Sith move first

Leave a Reply