Dart aims at the Web
Google has officially shown us Dart, unveiling a “technical preview” at the awesome GOTOCON in Aarhus.
Lars Bak posted the following as he got on stage:
Today we are introducing an early preview of Dart, a class-based optionally typed programming language for building web applications. Dart’s design goals are:
Create a structured yet flexible language for web programming.
Make Dart feel familiar and natural to programmers and thus easy to learn.
Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution.
Dart targets a wide range of development scenarios: from a one-person project without much structure to a large-scale project needing formal types in the code to state programmer intent. To support this wide range of projects, Dart has optional types; this means you can start coding without types and add them later as needed. We believe Dart will be great for writing large web applications.
The language comes with a set of basic libraries and tools for checking, compiling, and running Dart code, all of which will evolve further with your participation. We’ve made the language and preliminary tools available as open source on dartlang.org.
From the talk itself, he and Gilad tell us:
- You can run Dart via a native VM or via compiling to JS. This to be is the big news. If this could get real deployment, then the hook is in…. but the backup makes it viable? :/
- Dart has *no* primitive types
- No type errors, just warnings… “you’re innocent until proven guilty”
- Kasper Lund and Lars Bak (v8ers) worked on a proof of concept language called Spot
- main()? ugh
- Dart has isolates (actor model) and they can run remotely
- Named constructors: Greeter.withPrefix(this.prefix); var greeter = new Greeter.withPrefix(‘Howdy,’);
- This really does look like GWT…. Java-esque look + DOM/Webby content
- Eclipse-based tool was shown. Fine and all, but was hoping for something really special on the tooling side. We so badly need help there!
- Dart doesn’t currently support require (node/commonjs world), and you instead #import etc.
- “Heavy” isolates point to mapping to threads in the future
- It is fun to look at things (and learn) such as code reviews
- This is just me, but I much favor git clone from GitHub vs. gclient config
I have to admit, I was a little skeptical when I heard that this was first coming from Lars (as amazing as he is). He doesn’t write Web applications. He builds VMs. I was more hopeful when I heard that Gilad was in the game, but even there, has he written a large Web application? This feels like it needs more Alex Russell. (NOTE: I have no idea the scope of the team behind this… I am sure there are a bunch of Web folk… oh, wow, 66 folks are listed as owners + commiters!)
I fear that Dart has been built from an efficiency model upwards. That is fantastic. I personally prefer a platform that delights the developer and goes for developer happiness first. This is why I liked Ruby even when the runtime sucked.
In many ways I actually prefer the Objective-C trade-offs. There you have a high level language that is very different, but you can drop down to C if you need too. With ARC you aren’t in garbage collection land, but close…. and you don’t have to worry about the collection spikes harming your UI.
All together, feeling a little ‘meh’… but, still good to try new things and see what blossoms! What do you think?