<< Welcome Back JavaFX, To The Open Source World | Home | The OpenJDK Community Approves OpenJFX Project >>

If You Love Web Programming, Root For Dart

It's interesting to watch the debate between Brendan Eich and Google over the merits of Google's Dart programming language.

Brendan Eich: Don’t kid yourself. Google is not just trying to “advance the web”. Putting things in Chrome that have no standard spec in progress and none in sight, pulling Chrome-only (not just “works best in Chrome”) marketing stunts, paying app developers to do Chrome-only versions, paying for opt-out bundling of Chrome (with default browser opt-out to boot, recently killed by Microsoft when the Skype deal closed). These are intentional acts.

Brendan made it sound like the big bad Google is out to break the web. Somehow I don't believe it. Why would they want to do that? And Brendan's vehement opposition to Dart (something I heard mentioned on the Twitter but never paid attention) prompted me to seek out information about it. And what do I find? This:

Improving the DOM, written by Bob Nystrom: Here's some code:

// Old:
elem.addEventListener('click',
    (event) => print('click!'), false);

elem.removeEventListener(
    'click', listener);
// New:
elem.on.click.add(
    (event) => print('click!'));

elem.on.click.remove(listener);

As much as I hate web programming, I have to say that the new way of doing things feels better than the old. I can't imagine lovers of web programming would oppose such an improvement to the web programming landscape.

Brendan's argument against Dart is a political one: Dart is bad because Google will be putting it unilaterally into their own Chrome browser and they are not even trying to submit it as a standard. And even if they did, other browser vendors won't implement it, therefore Dart is a dead-end.

But isn't the crown jewel of web programming, the venerable XmlHttpRequest (aka Ajax) a proprietary mechanism unilaterally put into their own Internet Explorer browser by the big bad Microsoft?

Even Mozilla's own Firefox, contains plenty proprietary (although open source) tools that they are not intending to standardize, like XUL, that no one uses on the web.

I don't know if Dart will win at the end. But even if it loses, it deserves your support now, if only to put pressure on the JavaScript vendors to make improvements in a more rapid pace.



Re: If You Love Web Programming, Root For Dart

First, I wouldn't call it better. Fluent APIs tend to be very difficult to read in isolation. The 'On' property of a DOM element? Seriously? Second, JavaScript doesn't scale. But let's fix JavaScript. Even better, let's create a browser VM that is language agnostic. Lets do it through the standards bodies. I don't see an argument of what Microsoft did with IE4 as a good example of what we should be doing now.

Re: If You Love Web Programming, Root For Dart

Dart has a compiler to JavaScript, doesn't it? If they intend to ship that, there's a clear path forward for any non-chrome browser. Arguing against that is just like arguing against GWT.

Add a comment Send a TrackBack