3 ms·
Dart fixes this with initializer lists, which must run for every class in the hierarchy before any constructor bodies. Initializer lists have restricted access
by spankalee 7y ago
Dart fixes this with initializer lists, which must run for every class in the hierarchy before any constructor bodies. Initializer lists have restricted access to `this` so you can't call methods or pass `this` to functions.
- agumonkey 7y agoI often think that Dart is a failure.. but every time I read about it, they have interesting ways to do things. Maybe it's yet another language that only exists to die alone and spread its gene for the next decade to pick up ?
- aembleton 7y agoI think Flutter is helping to keep Dart alive - https://flutter.dev/ https://flutter.dev/
- thosakwe 7y agoDart isn't dead, though. Its use has been increasing because of Flutter. Beyond that, there are still new features coming out with every release, so I don't really think dead is the best word to describe it at this point.
- markdog12 7y agoIt also has named constructors, factories, const constructors for compile-time constants. https://dart.dev/guides/language/language-tour#constructors https://dart.dev/guides/language/language-tour#constructors