Olov's thread brings up an excellent question about language tools for dart
written in dart - along with some impressive early work in that direction.
To answer his primary question:
Yes, we are working on building a complete dart compiler in dart. If you
would like to see the current very early shape of this code you can find it
here:
http://code.google.com/p/dart/source/browse/#svn%2Fexperimental%2Ffrog
Short history:
I've spent the past ten months working as the tech lead on a project to
build web applications on top of the emerging dart language. This has been
a great education for me about how the web works and a wonderful
opportunity to help drive this language and tools to be great for actual
app developers. I'm very proud of the swarm application that we built both
for its beautiful UI and for the way we were able to drive the initial
uncertain phases of the language and tools based on concrete development
experience.
However, an interesting thing happened over the past 10 months. Dart has
matured enough to be fun to develop in. As I started to enjoy coding in
the language more, one day, about three weeks ago, I decided to try to
write a dart compiler in itself. Yes, I am one of those odd people who
sometimes decide that the most fun to be had on a rainy Sunday is to write
a compiler for a new language. This particular Sunday turned out to be one
of those glorious beginnings of a 48 hour coding binge that led to an
initial barely usable dart compiler in dart.
I've spent most of my career trying to end the battles between the dynamic
and static worlds and instead bring them together so that each side can
enjoy the benefits of the other. Writing this compiler in dart is the
first time that I've really felt the effortless blend of these worlds that
I've been seeking. In the past, I've always written the first version of a
compiler in a dynamic language (usually Python) in order to enable rapid
experimentation and avoid premature commitments. However, when the
structure was sufficiently solid, I would always move to a more static
language (usually Java or C#) in order to better support a larger code base
with more contributors. Dart is the first time that I have been able to
start off writing code in a very dynamic fashion and incrementally add
static checks as designs become solid or complexity warrants the effort.
Over the past three weeks, I've taken this very rough prototype forward -
with the help of several other outstanding compiler developers. So far, it
has scaled exactly as I would have hoped with the value of explicit
interfaces and other types showing itself at points of interaction - but
not really being required on the insides of well-defined modules. We've
made a lot of progress on this compiler already and feel that it is time to
get it out into the open.
This compiler is roughly three weeks old. It has some nice properties with
self-hosting and generating moderately readable JS output. However, it is
currently only passing two-thirds of the dart test suite - and a quick grep
for TODO in the code base will show you how much is left to be done. If
you like to live on the bleeding edge, feel free to take a look and give us
your feedback. If you'd like something more stable, please keep using our
more mature tools.
Thanks - Jim Hugunin