5 Things You Don’t Know About Dart
4. It’s not really statically typed. You can declare variables with or without types—it makes no difference whatsoever at runtime. If you like declaring variables with var, go right ahead. If you like documenting code with types, feel free (it’ll help with docs and code analysis tools).
3. It has beautiful unit (and acceptance) testing built into the language from the outset. To build bulletproof applications, you need a strong testing suite. And Dart has you covered. Brilliantly.
1. It rivals Ruby for code beauty. In addition to its simple, classical inheritance, Dart is loaded with syntactic sugar to make a programmer’s life easier. To name just a few, Dart has:
- Method cascades (calling multiple methods on the same object).
- First-class support for optional parameters (no more parsing an options hash, yay!)
- Getter and setter methods (methods that look like properties, but are backed by a normal method).
- Assignment of instance variables in the constructor declaration instead of the body.
- String interpolation—no more chains of plus signs!
It’s the little things really. And Dart has so many little things that add up to greatness.