The Programming Gurus Playfully Dissed JavaScript

By Darryl K. Taft  |  Posted 2012-04-03

Is It Time for JavaScript to Step Aside for the Next Big 'Web' Thing?

REDMOND, Wash. €” What do you get when you put a group of computer language geeks in one room and ask them about programming? Well, it seems one thing is a general complaint about one of the most popular languages in use today: JavaScript.

At the Lang.Next conference here, a panel of experts discussed everything programming and while they disagreed on several things, they seemed to come to agreement that JavaScript is a gnarly, unforgiving language that is a necessity in today€™s world.

The panelists included Microsoft€™s Anders Hejlsberg, best known as the creator of Turbo Pascal, Borland€™s Delphi and Microsoft€™s C#. Martin Odersky, founder, chairman and chief architect at Typesafe and creator of the Scala language was also a part of the panel. Gilad Bracha, creator of the Newspeak programming language and a member of the team building the new Dart language at Google also sat on the panel. And rounding out the panel was Peter Alvaro, a fourth-year computer science Ph.D. student at the University of California at Berkeley and a member of the team building the Bloom programming language for the cloud and other distributed computing systems. Microsoft software architect and language geek Eric Meijer moderated the panel.

Hejlsberg said his goal in building languages and tools is and always has been to make programmers more productive. He noted that while concurrency has been a big thing in the minds of developers for some time, he believes the next big thing is machine learning.

However, Hejlsberg added; €œJava used to be cross-platform but is no longer cross-platform; the new cross-platform language in town is JavaScript.€

Goaded by Meijer as to whether it is possible to write big programs in JavaScript, Hejlsberg replied, €œYes, you can, but you can€™t maintain them," much to the delight of the crowd that featured several prominent language and tools designers. €œI think there are some unmet needs there,€ Hejlsberg added.

Bracha immediately piped in saying, €œThat€™s part of why we€™re doing Dart. You can write them [large programs in JavaScript]; it€™s terribly hard and afterward you€™ll be punished.€

Google introduced an early preview of Dart, which the company refers to as a class-based optionally typed programming language for building Web applications, in October 2011. Google announced the Dart preview at the Goto Conference in Aarhus, Denmark, where Google engineers Lars Bak and Bracha presented an opening keynote for the event Oct. 10.

In an Oct. 10 blog post, Bak said Dart€™s design goals are to create a structured yet flexible language for Web programming, make Dart feel familiar and natural to programmers and thus easy to learn, and to ensure that Dart delivers high performance on all modern Web browsers and environments ranging from small handheld devices to server-side execution.

€œThat€™s why we€™re doing Dart,€ Bracha said. €œWe feel in some ways we should get back to 1995€”we want libraries and abstractions and to not have to worry about the quirks of this document format that€™s taken over the world.€

The Programming Gurus Playfully Dissed JavaScript


Ironically, the programming gurus€™ playful dissing of JavaScript came at the same time as the JSConf 2012 JavaScript conference was taking place in Scottsdale, Ariz.

Meanwhile, the discussion also broke down to the benefits of functional programming versus imperative programming. Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state. The difference between a mathematical function and the notion of a "function" used in imperative programming is that imperative functions can have side effects, changing the value of program state. A key tenet of functional programming is the concept of immutability. In functional programming, an immutable object is an object whose state cannot be modified after it is created.

€œThe challenge we try to solve is, we have to move from sequential programming to parallel programming, and we have to shift from imperative programming to functional programming€ to do so, Odersky said.

Yet, Hejlsberg said, €œI think the trick is getting there and having any semblance of performance left.€ He lamented the performance of functional programming languages while acknowledging the use of functional technology.

€Functional data structures are very useful,€ Hejlsberg said. He noted that Microsoft€™s "Roslyn," which is a set of APIs for exposing the Microsoft C# and Visual Basic .NET compilers as services available at runtime, is based on functional data structures.

However, he said: €œThe whole trick is making these new data structures performant enough. You can go further and further with functional, but there€™s always going to be that ultimate imperative nirvana.€

For his part, Alvaro said he believes the hard problems in programming continue to be in distributed computing, and they have become more urgent with the advent of the cloud. But, he said, €œIt€™s the same hard problem we€™ve been trying to solve.€

Alvaro recommends maximizing monotonicity. The Bloom programming language is based on the CALM principle. CALM is Consistency as Logical Monotonicity. A block of code is logically monotonic if it satisfies a simple property: Adding things to the input can only increase the output, according to a description of Bloom. By contrast, non-monotonic code may need to €œretract€ a previous output if more is added to its input.

As the discussion wound down, Alvaro noted that he believed adding support for certain complex functions in languages was a good way to go because €œverification€ can be achieved through the language.

However, Odersky said, €œWe are way past the point where we can verify against language.€

Rocket Fuel