Fresh off his success on VMs, the idea for Dart was a simple idea - to improve the state of the art of client-side web development. “We just want to improve the web platform... so that it’s easier to write bigger apps,” Bak tells The Reg during a recent interview as Dart marked its M1 delivery .
He's grown up a lot since then.
“I have learned it’s much harder to do a language than a virtual machine,” Bak confesses. “People are extremely opinionated when doing a language,” he says, before the Dane adds: “But this is great – I see that people care. I have learned that you have to do it properly.”
The problem is the curly-bracket heads just don’t accept your work as happily as most of them would accept any VM that's handed to them.
“The initial reaction to doing another programming language is people say: 'We have one that’s sufficient'. Change can be hard for some people. The other reaction is when you design the programming language [Dart] you [try] to make it simple so people can use it in an hour, so the other category of comments is: 'It’s a bit simple for me'."
“Some from the academic world expect more complex constructs but my view is if you don’t make it easy for ordinary programmers you don’t have a chance of success. That’s why the land has curly brace syntax and single inheritance.”
'I have learned it’s much harder to do a language than a virtual machine... People are extremely opinionated when doing a language' - Lars Bak
That’s meant a lot of heavy lifting so Bak hired an engineer to work on Dart’s semantics. When we spoke there had been 12,000 revisions with a new version every six to eight weeks. Since we chatted there's been an M2 release with more revisions . Dart 1.0 is now due this summer, Bak tells us, when the language should be finished and delivered along with a “good” set of libraries and a “good community of people using Dart.”
Google itself is the first domino that Bak needs to tumble - and it's a heavy one. “If we do not to prove ourselves the obvious benefit of using dart then Google will not convince other browser makers. My plan is to demonstrate better performance,” Bak admits.
No Googley magic wand
Just because Dart is Google's baby, that doesn't mean Dart is a shoo-in.
“Google is a big company and people are deciding what tools are most effective. I have to walk around and make sure people can see the advantage in using Dart,” Bak says. “So far so good, but no - there’s no magic wand inside the Googleplex. I don’t expect that everything to flip over next summer and that’s fine. It takes time to get a language popular inside and outside the company.”
Dart helps on things like 3D gaming. A detailed structure of objects means the VM doesn’t have to take time running floating point connections to run new objects, which puts extra pressure on the garbage collector.
Technology is one thing but overcoming the industry’s politics is a factor, too.
Bak's team has two hurdles to clear. Firstly, Apple, Microsoft, Mozilla and Opera will need to be convinced of the technical merits of Dart. But secondly, they will also need to be persuaded that Dart is not a cuckoo's egg that Google is trying to lay in their browser nests to take over the internet, that it's not a means to plonk them on a Mountainview roadmap or shoehorn them into helping Google’s search, advertising and web properties to the detriment of their own.
“While Dash is catching on with other browsers, we will promote it as the language for serious web development on the web platform," Miller continued in his October 2010 internal memo.
The memo leaked as Google revealed Dart at the Goto Conference in 2011.
C++ or ColdFusion - Dart's future
Fate is a shifting force in programming languages. C++, Java and PHP are today riding high, but for how long? Others that were once big - such as ColdFusion from Macromedia and Adobe for rapid web application development - are now in terminal decline.
Now, there are moves afoot to extend it further on the server with Node.js.
But, as we know, VMs are Bak's territory; it's languages that are tricky.
“Most people talk of a long adopt period – more than five years. We have working on this for two years and we already have good community. It looks pretty good, I’m very optimistic right now,“ Bak says. “This [Google] is the right place to do these projects.” ®