Feeds

Google's Dart on target to replace JavaScript? That'll be the day

Ecma standards effort won't topple web's lingua franca

New hybrid storage solutions

Analysis Last week, Google announced that the international standards body Ecma had formed a new technical committee devoted to Dart, the Chocolate Factory's homegrown web browser scripting language. But don't expect Dart to replace JavaScript as the web's lingua franca anytime soon.

"The new standardization process is an important step towards a future where Dart runs natively in web browsers," Google product manager Anders Sandholm wrote in a blog post on Thursday.

Maybe. Google already offers a browser with a built-in Dart virtual machine in the form of Dartium, the Chrome variant that comes with the Dart software development kit (SDK). It could very easily roll that code into the shipping version of Chrome. But getting other browser vendors to bundle Dart VMs with their own products will be a tall order, standard or no standard.

Make no mistake; JavaScript as it exists today has its share of issues. The language was designed in a hurry and it's packed full of insidious features that make it easy for programmers to do the wrong thing, especially when dealing with large projects.

Its design also makes it difficult to get good performance out of it. Browser vendors are constantly touting the performance gains of their latest JavaScript VMs, but in truth, these increases are generally small and the rate of progress is slowing. We may soon reach the limit of how much JavaScript code can be optimized.

How do you solve a problem like JavaScript?

Switching to a different language for client-side web development could help solve both of these problems. Google says its native Dart VM already outperforms its own JavaScript VM in some circumstances. Yet to assume that Dart will become JavaScript's successor just because it has Google's backing would be a mistake.

For one thing, Dart isn't the only solution that has been proposed. Language guru Anders Hejlsberg and a team of engineers at Microsoft have developed TypeScript as another way of attacking many of the same problems that Dart aims to solve, and these days many other languages can be compiled into JavaScript and run in a browser.

Even current Mozilla CTO Brendon Eich, JavaScript's creator, has lately backed Asm.js, a highly optimizable subset of JavaScript that's designed to be output from compilers. Using Asm.js and the Emscripten compiler, high-performance browser applications can even be written in C, for example.

What's more, even if Dart becomes a full-fledged Ecma standard, that's no guarantee that it will gain traction. JavaScript itself is based on an Ecma standard called EcmaScript, but it was submitted for standardization because it was a widely used language, not the other way around.

In the early 2000s, Microsoft made great hay about its C# language being accepted as both an Ecma and an ISO standard, but other than the Mono project, most of the industry greeted the news with a shrug. These days, the current version of the language is C# 5.0, but neither of the standards has been updated since version 2.0 in 2006. So much for that, then.

But perhaps the biggest impediment to Dart gaining widespread adoption is that so far it has been developed almost entirely within Google to address Google's own needs, and Google remains its most prominent backer, if not its only significant backer. Simply put, Dart is a Google product.

The web: We do it together or not at all

That doesn't bode well for Dart on the wider web, based on past examples. Previously, the Chocolate Factory has offered up the Pepper API, billed as a superior replacement for the old Netscape browser plugin API. But the other browser vendors have mostly rejected Pepper, with Eich saying Mozilla wasn't interested in the tech until it "achieves consensus" within the industry.

Standardization might be one way for Dart to achieve consensus where Pepper has not. But that implies that other major players in the industry will participate in the standardization process, and so far there's not much evidence that they plan to.

Just like how none of the other browser vendors got on board with Microsoft's web technologies like JScript and ActiveX in the 1990s, the wider web industry is unlikely to back a Google brainchild today. For better or worse, consensus is the way things get done on the web, and that's truer today than it has ever been.

That's not to say Dart is a dead end. It still has plenty of potential as a language that compiles into JavaScript, and Google is already using it for a few major projects internally.

Google could even go ahead and release a version of Chrome that includes a native Dart VM – even if the other browser vendors don't follow suit – and web developers could serve raw Dart code to Chrome users while sending Dart compiled into JavaScript to everyone else.

But that's what Dart seems destined to remain: an option, not an evolution. Like it or not, the web already has a client-side language, and it is JavaScript. There will continue to be many tools and ways of developing applications that run on JavaScript VMs, including writing Dart code that compiles to JavaScript. But even once Dart is standardized, to expect it to replace JavaScript altogether seems like wishful thinking – mainly because it's only Google that really wishes it. ®

Reducing the cost and complexity of web vulnerability management

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
Profitless Twitter: We're looking to raise $1.5... yes, billion
We'll spend the dosh on transactions, biz stuff 'n' sh*t
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.