3 ms·
Dart is basically Java Script. It's not called that because some language completely unrelated to Java called itself that already :) To reply to some of your
by jrockway 14y ago
Dart is basically Java Script. It's not called that because some language completely unrelated to Java called itself that already :)
To reply to some of your points:
The syntax is designed to look like Java. It's there for Java programmers, not to be the best syntax ever. (new is important, however, because you can also create objects with const.) Yeah, it's not Python.
Production and development mode are a common optimization in other languages. Remember: type annotations in Dart cannot, by design, change the behavior of the application. So in production mode, that part of the language spec is enforced. Static analysis tools, etc., are free to do whatever they want, however. I'd rather catch type errors at code review time rather than at runtime in production anyway.
The constructors make sense to me. They work like Java, and there is better syntax for initializing fields (which is all I ever do in constructors anyway).
Ultimately, it's Java in client-side form. Compare it to GWT, not Python or Haskell.
- lucian1900 14y agoRight, and I think that's precisely what's wrong with it. It's only slightly better than both Java and JavaScript, but not an appreciable improvement otherwise. I'd have hoped for a more interesting language for such an interestingly pedigreed VM.
- jrockway 14y agoAs a programming language, Dart isn't particularly interesting, but as a tool, it's very interesting. You can actually write client code that can be reused: as your web UI, as your smoke test, as a Chrome extension, etc. And it's easy to write tests for, with Hamcrest-style matchers.