News for hackers. Stuff that matters.
Re:Microsoft shoots down Google's Dart by tikhonj on Wednesday November 23, 2011 @03:10PM (#3271504)
JavaScript isn't a special "browser-only" language. It's just a normal interpreted, dynamically typed language (much like Python or Ruby) that just happens to run in all browsers. Right now it also happens to be quite a bit faster than Python or Ruby (as far as I know) and is also extremely expressive and flexible.

The fact that Python has "a wealth of libraries" isn't particularly pertinent--web apps mostly need web-specific libraries, which Python doesn't have (because it isn't in the browser). Most people using JavaScript get by with jQuery, maybe some web ui framework and perhaps something like Raphael. And, with the advent of node and server-side JavaScript, JavaScript is getting more and more libraries outside of the browser as well.

Of course, the browsers could support a bunch of different languages, but I think the complexity outweighs the (limited) benefits. Google, obviously, disagrees and thinks that Dart should also be an option, but I really think it isn't worth the effort.

Ultimately, JavaScript is more than good enough as a browser language; while it does have some annoying quirks, upcoming versions (and things like "use strict") are getting rid of most of them. There really is no overwhelming reason to switch away from JavaScript, and even just adding another language is probably not worth it.

Re:Microsoft shoots down Google's Dart by Yxven on Wednesday November 23, 2011 @03:53PM (#3271668)
Javascript was originally built for the browser and later expanded to other areas.

I'm not claiming that python wouldn't need a new standard library to manipulate a browser's dom tree or whatever. That's about all it would need though, so it seems like it would have been far less work to embrace and extend than to completely start over.

You seem to be arguing from the perspective (and please correct me if I'm wrong) that javascript is a good solution and a fine programming language, and I am not claiming otherwise. I just don't understand why so much effort has been spent creating and polishing Javascript instead of making slight improvements to a previously established quality language.

I suspect the answer is that your browser has an advantage if your javascript engine is faster, but there can be no advantage if everyone uses the standard python interpreter.

Re:Microsoft shoots down Google's Dart by tikhonj on Wednesday November 23, 2011 @04:12PM (#3271751)
I'm not sure why Netscape decided to write their own language for the job. Perhaps integrating a different language into their browser would have been difficult back then. Now, however, JavaScript is a well-established language so there is no need to replace it with anything else.

Also, unless I'm unaware of something, wasn't Perl the most popular scripting language back then? So if they had included an already existing language, Perl would probably have been the best bet.

Re:Microsoft shoots down Google's Dart by chromatic on Wednesday November 23, 2011 @04:36PM (#3271855)
So if they had included an already existing language, Perl would probably have been the best bet.

Embedding Perl was (and is) painful. Tcl would have been easier.

Sandboxing would have been more difficult. Auditing all of Perl 5's operations for the possibility of escaping that sandbox is a huge task.

Re:Microsoft shoots down Google's Dart by WayneDB on Wednesday November 23, 2011 @05:14PM (#3271999)
The web browser is being sold to developers as a "general applications platform" to compete with native applications.

Since native environments often give the developer a greater degree of language-choice freedom as well as greater degree of access to complex APIs, I fail to see how offering the same freedoms in the comparatively miniscule browser API would cause the complexity to outweigh the benefits.

If browser makers just standardized on a language-neutral runtime like the JVM or the CLR then no central committee would have to be responsible for maintaining support for specific languages.

Re:Microsoft shoots down Google's Dart by seanalltogether on Wednesday November 23, 2011 @05:26PM (#3272042)
Exactly, it's time for us to transition to a CLR for web browsers and allow people to continue deploying plain-text javascript which the browser can compile, or let them deploy precompiled byte code written in their favorite language.