News for hackers. Stuff that matters.
Re:Dart language by sambeau on Monday October 10, 2011 @06:32AM (#3093158)
This is completely the wrong thing to do.

Google should be proposing a standard, open, byte-code compatible, Intermediate Language standard that can run Javascript and in the interim run on Javascript.

That is something I could see Mozilla and Apple getting behind.

Only once they have actively campaigned for this should they be adding new languages to the browser which fracture the web.

I had hoped that Dart would surprise us and turn out to be a 'machine-code for the web' implementation. This would have been a much smarter move, I believe.

Re:Dart language by paulkoer on Monday October 10, 2011 @07:16AM (#3093251)
+1000. Give us a platform that people can grow languages on! Maybe the DartVM could become something like what you describe in the same sense as the JVM/CLR is a platform for many languages now? But since their pushing the language it doesn't seem to be the stated goal... sad ;(
Re:Dart language by ConstantineXVI on Monday October 10, 2011 @08:37AM (#3093493)
Oddly enough, if in-browser Java had "won", we'd already have such a thing.
Re:Dart language by sambeau on Monday October 10, 2011 @09:01AM (#3093575)
True. But in return we would have had to endure 10 years of in-browser Java.
Re:Dart language by tolmasky on Monday October 10, 2011 @10:50AM (#3093988)
We would have just built something else on the JVM. You could be writing Ruby in the browser with JRuby, or Python in the browser with Jython, or Scala. This would be a much better world (tooling and performance-wise) than the current compile to high level JS strategy.
Re:Dart language by wavephorm on Monday October 10, 2011 @11:45AM (#3094252)
As opposed to 10 years of stagnant JavaScript, and a conversion en-masse of all all video, audio, game content to Flash??

It was really sad to see everybody moving to Flash JavaScript could've done video/audio and games a long time ago.

Re:Dart language by leoc on Monday October 10, 2011 @01:48PM (#3094899)
Not necessarily - in that case, we might still be stuck with the Sun-versus-MS and Sun-versus-the-world games over control of the JVM, and with the JVM's startup-time problem. Though the startup-time problem was so bad that it's hard to imagine in-browser Java winning with the problem still there.
Re:Dart language by leoc on Monday October 10, 2011 @01:43PM (#3094880)
> Google should be proposing a standard, open, byte-code compatible, Intermediate Language standard that can run Javascript and in the interim run on Javascript.

> That is something I could see Mozilla and Apple getting behind.

Why would you expect either Mozilla or Apple to get behind such a proposal? Apple has a powerful self-interest in making sure the Web remains a second-best app platform behind iOS and desktop OS X. Mozilla wants the Web to be the premier app platform - but it's no bloody good to Mozilla if the web is the world's #1 web platform but Mozilla has no control over it anymore. The last thing Mozilla wants to see is the Web browser become some fairly-easily-implemented, highly-interchangeable runtime platform adhering to a stable, open spec somewhere. This would, I think, be very good for the world at large, but it would undoubtedly be very bad for Mozilla - it's what is known as the commoditization of the platform. Mozilla's self-interest is served by keeping as much of the Web as possible controlled, in the minutest detail possible, by the hard-to-join club of major browser vendors. Right down to things like the lexical syntax of JavaScript. So in reality, as soon as Google proposed such an IL, Mozilla's advocates would start blowing smoke about "oh no, another Java".

Re:Dart language by BrendanEich on Tuesday October 11, 2011 @09:28AM (#3098439)
"Mozilla" consists in part of a bunch of people working to write down standards precisely so new browser implementors can enter the market and interoperate. I've spent years at this for the JS standard. It's part of the inevitable commoditization you cite.

Also, going back to 2006 or so when I invited pre-Google Alex Russell and other JS hackers to Ecma TC39 meetings, Mozillans including yours truly have tried to open up the standards process. Mozilla, Opera, and Apple co-founded the WHATWG and set up an open membership structure for it in 2004, to create HTML5. W3C finally relented and internalized much of that structure.

So alleging that "Mozilla" is trying to keep the old boy's club closed is simply false.

I've cited hard, in some cases physical (as in physics) reasons for why there won't be a lower-level bytecode standard for browser-based VMs any time soon. I'm not blowing smoke.

http://www.aminutewithbrendan.com/pages/20101122

A high level bytecode sounds a lot like minified JS source, with a relatively-few extensions to the standard language. Extending is easier than replacing or setting up a new, parallel cross-browser standard.

Your inflamed sense of grievance at "Mozilla" is misplaced. Mozilla has no control other than what users of our software delegate to us by trusting us enough to download and run our stuff. We do not have hundreds of millions in our browser advertising budgets. We do not have billions of revenue with which to influence people or pay for attention and distribution.

If we are really in the way of Web standards, I'll personally pull the plug.

Re:Dart language by JimBlandy on Tuesday October 11, 2011 @03:16PM (#3099910)
At a technical level, virtual machines are not the panacea many folks seem to think.

Certainly, VM byte code languages are often simpler than silicon processors' machine languages; perhaps they offer safety guarantees; and perhaps they provide garbage collection. These are all big wins for language implementers targeting such VMs.

But what no virtual machine will ever do is make modules written in different source languages work together transparently. Any time one module calls another module written in a different language, at least one side of that boundary needs to be written with a detailed understanding of both languages' semantics.

Tiny details of the semantics influence the idioms people settle on in that language --- and interfaces are designed around those idioms. For example, JavaScript conditionals treat the empty array and the empty object as true, while Python conditionals treat them as false. Each of these facts shapes what people expect of a "natural" API in that language --- and that ensures that modules written in other languages will always "speak with an accent", or seem unnatural, at best.

You can define a common data world, as the .NET CLR does, and extend each source language to cover that world, but the effect is to change each participant language into a gloss on the common data world. This is why CoffeeScript fits seamlessly into the JavaScript world: JavaScript's and CoffeeScript's data worlds are exactly the same. CoffeeScript cannot deviate from JavaScript's types and objects.

Each programming language is like a city occupying an island: commerce within the city is much less expensive than commerce between islands. Although it's sometimes worth it, dealing with "foreigners" is confusing and risky. No VM will change that.

Re:Dart language by justncase80 on Thursday October 13, 2011 @12:03PM (#3107639)
It seems to allow for more variation in languages. The only time you really need to worry about those other languages is when you're trying to load modules written in other languages. At least that's how it works in .net. You can have pretty significant semantics from language to language and as long as you don't care about other languages actually loading your modules then it doesn't matter. If you concede that the problems of the lang->il developer are essentially the same as the lang->lang developer, then shouldn't we evaluate the il option strictly on it's merits? Such as reduced compilation at runtime and smaller payloads over the wire? As well as, optimally, less quirks than a language like JS. Not to mention existing lang->il compilers would have much less effort to retarget their output to the new platform. It just seems like a huge win to add the vm layer as the base instead of a general purpose language in every way.
Re:Dart language by JimBlandy on Wednesday October 19, 2011 @10:07PM (#3133074)
Oh, targeting a good VM is a huge win over a typical machine language for an implementer. My prediction is specifically that the inter-language paradise some expect will never come.

But even within the points you bring up, I'm not sure that VMs are as winning as they're made out to be. Size and compilation time aren't somehow intrinsically better for VMs; JS does quite well on both fronts these days. And I'm not convinced JS's quirks are harder for implementers to cope with than a silicon machine language's.

Re:Dart language by JimBlandy on Tuesday October 11, 2011 @02:48PM (#3099800)
If this were our (Mozilla's) strategy, it's hard to understand why we'd release our code under an open source license, and why we'd insist on every standard we implement being freely implementable by anyone with the requisite chops.

Mozilla "conspires" to do almost exactly the opposite of what you suggest. Having lots of decent browsers available was our old success condition. Now the mobile world is starting to look locked up, so breaking that open to competition and free choice is our new success condition.

Re:Dart language by gcp on Tuesday October 11, 2011 @10:05AM (#3098576)
The last thing Mozilla wants to see is the Web browser become some fairly-easily-implemented, highly-interchangeable runtime platform adhering to a stable, open spec somewhere.

Really? I thought that was the _mission_ of Mozilla. Except for the "stable" part perhaps, because that's quite at odds with innovation.

The track record easily shows that pretty much every single thing you have said is wrong.