4 ms·
OK, I'll bite. In what ways does Dart reek of Java? * Dart has top-level variables and functions, Java does not. * Dart has optional static types, Java does no
by sethladd 14y ago
OK, I'll bite. In what ways does Dart reek of Java?
* Dart has top-level variables and functions, Java does not.
* Dart has optional static types, Java does not.
* Dart programs start at main(), Java does not (see static initializers)
* Dart has factory constructors, Java does not.
* Dart has true lexical scope and nested functions, Java does not.
* Dart doesn't need to be compiled into bytecode, Java does.
* Dart's classes have implicit interfaces, Java does not.
* Dart has auto generated getters and setters for fields, Java does not.
* Dart has one-line function syntax, Java does not.
* Everything in Dart is an object, Java has primitives.
* Dart has only library privates, Java has public/protected/package/private.
* Dart starts quicker than Java.
In all fairness, both Dart and Java and JavaScript use { } and ;