Feeds

Google's JavaScript assassin: Web languages are harder than VMs

Dart daddy Lars Bak: JavaScript? I have no problem with it

The Power of One Brief: Top reasons to choose HP BladeSystem

'I have no problem with JavaScript'

Bak reckons Dart is ideal for Gmail. Google's email service has 1MB of source code that must be read before starting, but Dart’s structure lets the VM take a snapshot that’s stored in the browser, which can be booted up in one-tenth of the time it takes to load the full code from scratch. “That’s hard to do in JavaScript because in setting up the program you have to execute the source code; that source code has side effects and those side effects cannot be snapshotted,” Bak said.

Dart helps on things like 3D gaming. A detailed structure of objects means the VM doesn’t have to take time running floating point connections to run new objects, which puts extra pressure on the garbage collector.

Bak now reckons Dart runs 30 per cent faster on Google's V8 than JavaScript under the Richards operating system kernel simulation benchmark and under the DeltaBlue benchmark – two standards used at Google. The goal is for Dart to become twice as fast.

Technology is one thing but overcoming the industry’s politics is a factor, too.

Bak's team has two hurdles to clear. Firstly, Apple, Microsoft, Mozilla and Opera will need to be convinced of the technical merits of Dart. But secondly, they will also need to be persuaded that Dart is not a cuckoo's egg that Google is trying to lay in their browser nests to take over the internet, that it's not a means to plonk them on a Mountainview roadmap or shoehorn them into helping Google’s search, advertising and web properties to the detriment of their own.

That memo on replacing JavaScript won’t help - it was strongly worded stuff. Googler Mark Miller in 2010 wrote: “The goal of the Dash [the initial name for Dart] effort is ultimately to replace JavaScript as the lingua franca of web development on the open web platform,” he said.

“This is not taking anything away from JavaScript... we have to make sure the web really competes well. With the mobile ecosystem we have to do a lot of innovation in the browser,” Bak said.

“While Dash is catching on with other browsers, we will promote it as the language for serious web development on the web platform," Miller continued in his October 2010 internal memo.

Google was promising to play nicely and be a good member of the JavaScript team, evangelising it in public for the next version of JavaScript – codenamed Harmony. Behind the scenes, though, it would evangelise Dash among web developers and browser makers and push for standardisation "and adoption across the board".

The memo leaked as Google revealed Dart at the Goto Conference in 2011.

Bak says Dart makes programmers more efficient for the web and notes that neither he, nor Google, has "a problem" with JavaScript. He points to his history on V8 as proof of his commitment - and Google's - to the language.

"This is not taking anything away from JavaScript... we have to make sure the web really competes well. With the mobile ecosystem we have to do a lot of innovation in the browser," Bak says. "I have no problems with JavaScript."

He does have a point: V8 helped push browser-makers in to competing on JavaScript rendering speeds, producing a battle of the benchmarks between 2009 and 2011 so tech companies could all claim to have the "fastest" browser on the web. Today, JavaScript is running faster in the browser than at any time.

V8 helped change the web development strategy of the world’s largest software company – Microsoft. As Mozilla and the WebKit team were working to become the fastest JavaScript engines on the web and Microsoft risked being branded the web's slowest browser, the kiss of death among devs who are the gatekeepers to what gets built and used in software.

C++ or ColdFusion - Dart's future

When Microsoft released IE9, it dumped more than a decade of history of forcing devs to build one version of their sites for Microsoft's browser and another version for everybody else. For its new browser, Redmond went with a standards-compliant and streamlined JavaScript engine, Chakra. Chakra helped Microsoft run that benchmark race.

Fate is a shifting force in programming languages. C++, Java and PHP are today riding high, but for how long? Others that were once big - such as ColdFusion from Macromedia and Adobe for rapid web application development - are now in terminal decline.

JavaScript was standardised as ECMAScript in 1997 - as ColdFusion was on the rise - but it was only within the last half decade that it come into its own. This is because devs were finally recognising JavaScript's power as a client-side language that came with the familiarity of C and Java, but without the problem - thanks to the ECMAScript standard - of being tied in to a single vendor's runtime or roadmap.

Now, there are moves afoot to extend it further on the server with Node.js.

Bak is confident Dart has a long future at the top and feels working for the internet's largest search and ad company will help propel it. Yet Dart must gain credibility inside and outside the Googleplex. It also remains in desperate need of a finished VM: the "snapshotting" that would allow Dart to spin up services such as Gmail more quickly than can be done in JavaScript is dependent upon the shiny new VM.

But, as we know, VMs are Bak's territory; it's languages that are tricky.

“Most people talk of a long adopt period – more than five years. We have working on this for two years and we already have good community. It looks pretty good, I’m very optimistic right now,“ Bak says. “This [Google] is the right place to do these projects.” ®

Securing Web Applications Made Simple and Scalable

More from The Register

next story
Whoah! How many Google Play apps want to read your texts?
Google's app permissions far too lax – security firm survey
Chrome browser has been DRAINING PC batteries for YEARS
Google is only now fixing ancient, energy-sapping bug
Do YOU work at Microsoft? Um. Are you SURE about that?
Nokia and marketing types first to get the bullet, says report
Microsoft takes on Chromebook with low-cost Windows laptops
Redmond's chief salesman: We're taking 'hard' decisions
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
Big Blue Apple: IBM to sell iPads, iPhones to enterprises
iOS/2 gear loaded with apps for big biz ... uh oh BlackBerry
OpenWRT gets native IPv6 slurping in major refresh
Also faster init and a new packages system
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Top three mobile application threats
Prevent sensitive data leakage over insecure channels or stolen mobile devices.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Mobile application security vulnerability report
The alarming realities regarding the sheer number of applications vulnerable to attack, and the most common and easily addressable vulnerability errors.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Consolidation: the foundation for IT and business transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.