And as always, view the changelog for the full list of changes, and to get started with the Editor see our tutorial.
- Pub publish command
- More cleanups including:
on.click.add => onClick.listen
migrate Future.delayed()
migrate Uri.isAbsolute/hasAuthority() to getter
migrate Timer- Minor fixes to Samples
Breaking Change List:dart:htmllibraries:
- A number of Indexed DB APIs have been updated to return Futures, more will be updated.
- Deprecated events syntax has been removed.
- Element.dataAttributes has been removed, use Element.dataset instead.
- deprecated Collections-methods removed.
- New StringBuffer API, implementing StringSink interface.
For more, see the latest news.
Posted by Seth Ladd
(This is an "oldie but a goodie" misc@dartlang.org post originally written by Bob Nystrom. It is being posted here as the explanations still ring true.)
Bob writes:
"static", "final", and "const" mean entirely distinct things in Dart:
"static" means a member is available on the class itself instead of on instances of the class. That's all it means, and it isn't used for anything else. static modifies *members*.
"final" means single-assignment: a final variable or field *must* have an initializer. Once assigned a value, a final variable's value cannot be changed. final modifies *variables*.
"const" has a meaning that's a bit more complex and subtle in Dart. const modifies *values*. You can use it when creating collections, like const [1, 2, 3], and when constructing objects (instead of new) like const Point(2, 3). Here, const means that the object's entire deep state can be determ…
(This is an "oldie but a goodie" misc@dartlang.org post originally written by Bob Nystrom. It is being posted here as the explanations still ring true.)
Bob writes:
"static", "final", and "const" mean entirely distinct things in Dart:
"static" means a member is available on the class itself instead of on instances of the class. That's all it means, and it isn't used for anything else. static modifies *members*.
"final" means single-assignment: a final variable or field *must* have an initializer. Once assigned a value, a final variable's value cannot be changed. final modifies *variables*.
"const" has a meaning that's a bit more complex and subtle in Dart. const modifies *values*. You can use it when creating collections, like const [1, 2, 3], and when constructing objects (instead of new) like const Point(2, 3). Here, const means that the object's entire deep state can be determ…
Comments
Post a Comment