Crockford may have been right, however, when he described it as a language that people didn’t feel the need to learn before beginning to program with it.
Coming to ECMAScript… eventually
The module declaration is perhaps the most popular improvement coming to ECMAScript 6. With it, a block of code can be encapsulated inline or externally. Classes are also coming, though in the form of syntactic sugar intended to make code more readable, not turn it into Java, according to Google Chrome developer and ECMAScript standards committee member Alex Russell.
“What you should take away from this isn’t that we’re turning JS into Java, it’s that we’re making it easier to read, and that’s all,” he blogged. “Once more for effect: What class means in [ECMAScript 6] is function. Or at least one of the things you currently do with function.” Most importantly, these classes don’t imply a strict type system like Java’s.
Standards bodies ratify at the speed of sedimentation, but some of the changes proposed in the ECMAScript spec are already finding their way into browsers—and tools.
TypeScript enables static typing
According to Microsoft Technical Fellow Anders Hejlsberg, lead architect of C#, “Static typing is one of those things that have powered the IDE revolution over the past decade; things like code completion, refactoring, code definition, navigation in large codebases. It’s all powered by static typing,” he said in an October 2012 conference presentation introducing TypeScript with Hoban.
Microsoft has made one thing clear: TypeScript won’t break ECMAScript compatibility. “There is definitely a lot of benefit to ECMAScript 6,” said Hoban. “But it takes time for the standards process to evolve. We take some of those capabilities and bring them to developers today, and also add static typing, which is a more unique part of the value proposition.”
A core philosophy of the TypeScript language, however, is that the static types that a developer adds for more robust, maintainable code are completely erased at compile time, Hoban explained. “When you use them, you get all these benefits at development time, but no artifacts left behind so the performance of the code will match your expectations.”
Google, albeit unintentionally, made its ambitions clear. In a leaked 2010 memo by Google researcher Mark Miller, he wrote:
Out of the box, Dart has a core set of libraries for collections, queues, maps, unit testing (similar to Ruby’s RSpec) and a Web driver library. A headless version of Dartium (a special Chrome build with the Dart VM included) lets developers run programs from the command line. The drone.io continuous integration service also runs the Dart VM “so you get this slick dev cycle right out of the box,” Ladd told FLOSS. Finally, Dart must be written in its own Eclipse-based Dart Editor.
Multicore phones and mature developers
“The power is in the browser,” said Ladd. “The pendulum is shifting more to using those multicores in your phone or the 1TB of space on your laptop. For a long time, the Web was not able to take advantage of that.”