Feeds

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

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

3 Big data security analytics techniques

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

Top three mobile application threats

More from The Register

next story
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Inside the Hekaton: SQL Server 2014's database engine deconstructed
Nadella's database sqares the circle of cheap memory vs speed
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Oh no, Joe: WinPhone users already griping over 8.1 mega-update
Hang on. Which bit of Developer Preview don't you understand?
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
IRS boss on XP migration: 'Classic fix the airplane while you're flying it attempt'
Plus: Condoleezza Rice at Dropbox 'maybe she can find ... weapons of mass destruction'
prev story

Whitepapers

Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
SANS - Survey on application security programs
In this whitepaper learn about the state of application security programs and practices of 488 surveyed respondents, and discover how mature and effective these programs are.