I'd like to share my (small) experience working with the dart platform
so far. This is meant to be constructive, to share things hoping
someday they will be improved :). I'm trying to ignore stuff I know is
being worked on at the dart team.
-Dart editor can be really slow at times, with unworkable delays for
autcompletion/file switching/saving. Turning off auto-build helps here
sometimes to speed up.
-Sometimes dart editor seems to be running an old build, failing to
refresh
-No integrated test environment in the darteditor. A simple testing
framework solves this, but is inherently slower (testing small
snippets of code require firing up the complete app, dartium, etc),
violating the principle that tests should be fast.
-dart2js in darteditor failed without any sensible error message
-Why does object not implement Hashable?
-Reflection kind of works for object class names when using
String temp = obj.toString().substring(13);
return temp.substring(0,temp.length - 1);
Does this work at all in javascript compiled dart? Also, don't
override toString() ;)
-Terse, clear, simple, nice looking code! Compared to Java/C# horror
of 50 imports, 10+ lined javadocs, 2 loc for curley braces, mandatory
newline for "return" (as opposed to =>, which can be on the same
line), Dart code is a breeze for my brain to build a mental model of
the code. "One page", lets say 32 loc, can amount for twice, three
times or even four times as terse code compared to java/c#. Awesome!
-Initialization code of variables can however reverse this terseness a
bit: you need 1 loc for declaration, 1 loc for initialization, as
opposed to c#/java needing only 1 loc of declaration+initialization.
-Traits (concrete interfaces) can remove duplicate code for Hashable
implementors & custom collections. Currently, you need duplicate code
to implement them.
-What class to subclass an implementation of List<T>? I didn't get
this to work.
-Renaming classes requires renaming all constructors (minor annoyance,
prolly solved with better refactoring tools)
-Missing event support in dart (my take:
https://github.com/generateui/Dartan/blob/master/Observable.dart) -->
I will clarify & submit in the issuetracker)
-new Element.html("<div></div>") or new Element.tag("div") is weakly
typed, fell a few times in this trap. Why not just new Element.div(),
or new Div()? Seems more intuitive to me.
So far, very positive, few rough edges, very workable. Keep up the
good work :)
Ruud