|
|
|
|
|
by grimlck
5353 days ago
|
|
It actually seems like Dart didn't reuse anything in GWT, other than 'lessons learned' - if it did, it would have the GWT compiler's dead code elimination, optimizations, dev mode, story of your compile, code splitting, etc. I'm guessing it wouldn't be a good match because Dart is fundamentally closer to a dynamic language than a statically typed language The similarities to java seem to come from conservatism in language design more than anything else. |
|
1) erase types. All method parameters become Object, all variables become Object.
2) implicitly add an interface to each class for each method type ie classes with String toString(String) get an implicit interface with one method Object toString(Object).
3) implicitly cast from Object to the method-interface type in order to call methods.
That sounds pretty slow, but also not very far from Java. I doubt it would take more than a day to make a prototype .dart to .java source converter that actually worked on JVM.