Feeds

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

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

Boost IT visibility and business value

'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.” ®

Build a business case: developing custom apps

More from The Register

next story
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
Leaked Windows Phone 8.1 Update specs tease details of Nokia's next mobes
New screen sizes, dual SIMs, voice over LTE, and more
Mozilla keeps its Beard, hopes anti-gay marriage troubles are now over
Plenty on new CEO's todo list – starting with Firefox's slipping grasp
Apple: We'll unleash OS X Yosemite beta on the MASSES on 24 July
Starting today, regular fanbois will be guinea pigs, it tells Reg
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Cloudy CoreOS Linux distro declares itself production-ready
Lightweight, container-happy Linux gets first Stable release
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
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.
Maximize storage efficiency across the enterprise
The HP StoreOnce backup solution offers highly flexible, centrally managed, and highly efficient data protection for any enterprise.