Feeds

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

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

Top 5 reasons to deploy VMware with Tegile

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

Providing a secure and efficient Helpdesk

More from The Register

next story
Google+ goes TITSUP. But WHO knew? How long? Anyone ... Hello ...
Wobbly Gmail, Contacts, Calendar on the other hand ...
Preview redux: Microsoft ships new Windows 10 build with 7,000 changes
Latest bleeding-edge bits borrow Action Center from Windows Phone
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
Google opens Inbox – email for those too stupid to use email
Print this article out and give it to someone techy if you get stuck
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Redmond top man Satya Nadella: 'Microsoft LOVES Linux'
Open-source 'love' fairly runneth over at cloud event
prev story

Whitepapers

Cloud and hybrid-cloud data protection for VMware
Learn how quick and easy it is to configure backups and perform restores for VMware environments.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
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?
Three 1TB solid state scorchers up for grabs
Big SSDs can be expensive but think big and think free because you could be the lucky winner of one of three 1TB Samsung SSD 840 EVO drives that we’re giving away worth over £300 apiece.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.