|
|
|
|
|
by 0xABADC0DA
5355 days ago
|
|
A way to show differences is to say what steps would be involved getting Dart code to run on the JVM. As far as I can tell the only real difference is type erasure, so all you'd have to do is: 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. |
|