3 ms·
Dart is emphatically not statically-typed. https://www.dartlang.org/articles/why-dart-types/ https://www.dartlang.org/articles/why-dart-types/ Under the headi
by kibwen 13y ago
Dart is emphatically not statically-typed.
https://www.dartlang.org/articles/why-dart-types/ https://www.dartlang.org/articles/why-dart-types/
Under the heading, "Background: Dart is a dynamically typed language, and proud of it":
"Dart is dynamically typed, in the tradition of LISP, Smalltalk, Python, and JavaScript. Users of dynamically typed languages, and in particular users of JavaScript for web programming, will understand why we chose this. If you are more of a static typing person, you may not be convinced—but let’s save this for another discussion. For now, let’s take this as a starting point: Dart is dynamically typed."
- 10098 13y agoIt's optionally statically typed. You can choose to use types if you want. That alone is a huge improvement.
- kibwen 13y agoYou should really read the link that I posted there (note as well that this is documentation from the official Dart site). Scroll down to the heading, "Why is the static typing unsound?" to determine why Dart is really and truly not statically typed by any stretch of the imagination. The TL;DR is that, by definition, static type systems are pessimistic and dynamic type systems are optimistic, and Dart's type system is profoundly optimistic. If you truly want a Javascript alternative with optional typing, try TypeScript instead.