'Seth Ladd' via Dart Announcements
2015-08-25 15:03:03 UTC
tldr: Dart 1.12.0-dev.5.10 ("RC0") is ready for testing! Please download it
<https://www.dartlang.org/downloads/archive/> and test it against your
apps. This is the first release candidate of 1.12. It contains the new
null-aware operators language feature, and enhancements to pub,
Observatory, dartdoc, and much more.
Null-aware operators
The new null-aware operators
<http://blog.sethladd.com/2015/07/null-aware-operators-in-dart.html> help
you reduce the amount of code required to work with references that are
potentially null. This feature is a collection of syntactic sugar for
traversing (potentially null) object calls, conditionally setting a
variable, and evaluating two (potentially null) expressions.
`??`: if null operator. `expr1 ?? expr2` evaluates to `expr1` if not
`null`, otherwise `expr2`.
`??=`: null-aware assignment. `v ??= expr` causes `v` to be assigned `expr`
only if `v` is `null`.
`x?.p`: null-aware access. `x?.p` evaluates to `x.p` if `x` is not `null`,
otherwise evaluates to `null`.
`x?.m()`: null-aware method invocation. `x?.m()` invokes `m` only if `x` is
not `null`.
Learn more about Dart's null-aware operators in our Language Tour
<https://www.dartlang.org/docs/dart-up-and-running/ch02.html>.
.packages file
We continue in our efforts to eliminate symlinks by introducing the .packages
file, which is a new way to specify where to find package dependencies. The
pub package manager now writes a .packages file when getting or upgrading
dependencies, and the VM and dartanalyzer use the .packages file for
package resolution.
The Dart SDK still generates symlinks in 1.12, but the .packages file gets
us closer to eliminating them. If you have tools that introspect packages,
now is a good time to investigate the .packages file
<http://blog.sethladd.com/2015/08/new-dart-sdk-eliminates-symlinks.html>.
dartdoc
The dartdoc tool <https://github.com/dart-lang/dartdoc> is a new way to
generate beautiful, fast-loading API docs. It replaces dartdocgen, which we
plan to remove from the SDK as soon as 1.13. dartdoc generates static docs,
helps you search with find-as-you-type, and looks great on a mobile device.
dartfmt
Speed up your code reviews by automatically formatting your code. The dartfmt
tool <https://github.com/dart-lang/dart_style> has been largely rewritten
to support better handling for long argument lists, smarter indentation for
cascades, nested functions, and collections, and fixes over 50 issues.
Observatory
Help identify memory leaks with Observatory's updated allocation profiler.
Turn it on for a class, and track where instances of that class are
created. Also new in 1.12 is support for dart:developer's log() function,
which your app can use to stream log calls into Observatory's (or any
connected debugger) console.
Stepping through async/await code has been significantly improved with
Observatory's new anext command. You can now step over an await call, onto
the next line of your code.
pub
The pub run commands can now toggle checked mode, with --checked. Pub now
writes a .packages file when getting, upgrading, and globally activating
your packages.
Lots more
The Dart SDK 1.12 CHANGELOG
<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#1120> has lots
more details about various API tweaks. We look forward to your feedback
<https://github.com/dart-lang/sdk/issues>, so we can release 1.12 final.
Please test your packages and apps with 1.12 "RC0" and report issues
<https://github.com/dart-lang/sdk/issues>.
--
For more news and information, visit https://plus.google.com/+dartlang
To join the conversation, visit https://groups.google.com/a/dartlang.org/
<https://www.dartlang.org/downloads/archive/> and test it against your
apps. This is the first release candidate of 1.12. It contains the new
null-aware operators language feature, and enhancements to pub,
Observatory, dartdoc, and much more.
Null-aware operators
The new null-aware operators
<http://blog.sethladd.com/2015/07/null-aware-operators-in-dart.html> help
you reduce the amount of code required to work with references that are
potentially null. This feature is a collection of syntactic sugar for
traversing (potentially null) object calls, conditionally setting a
variable, and evaluating two (potentially null) expressions.
`??`: if null operator. `expr1 ?? expr2` evaluates to `expr1` if not
`null`, otherwise `expr2`.
`??=`: null-aware assignment. `v ??= expr` causes `v` to be assigned `expr`
only if `v` is `null`.
`x?.p`: null-aware access. `x?.p` evaluates to `x.p` if `x` is not `null`,
otherwise evaluates to `null`.
`x?.m()`: null-aware method invocation. `x?.m()` invokes `m` only if `x` is
not `null`.
Learn more about Dart's null-aware operators in our Language Tour
<https://www.dartlang.org/docs/dart-up-and-running/ch02.html>.
.packages file
We continue in our efforts to eliminate symlinks by introducing the .packages
file, which is a new way to specify where to find package dependencies. The
pub package manager now writes a .packages file when getting or upgrading
dependencies, and the VM and dartanalyzer use the .packages file for
package resolution.
The Dart SDK still generates symlinks in 1.12, but the .packages file gets
us closer to eliminating them. If you have tools that introspect packages,
now is a good time to investigate the .packages file
<http://blog.sethladd.com/2015/08/new-dart-sdk-eliminates-symlinks.html>.
dartdoc
The dartdoc tool <https://github.com/dart-lang/dartdoc> is a new way to
generate beautiful, fast-loading API docs. It replaces dartdocgen, which we
plan to remove from the SDK as soon as 1.13. dartdoc generates static docs,
helps you search with find-as-you-type, and looks great on a mobile device.
dartfmt
Speed up your code reviews by automatically formatting your code. The dartfmt
tool <https://github.com/dart-lang/dart_style> has been largely rewritten
to support better handling for long argument lists, smarter indentation for
cascades, nested functions, and collections, and fixes over 50 issues.
Observatory
Help identify memory leaks with Observatory's updated allocation profiler.
Turn it on for a class, and track where instances of that class are
created. Also new in 1.12 is support for dart:developer's log() function,
which your app can use to stream log calls into Observatory's (or any
connected debugger) console.
Stepping through async/await code has been significantly improved with
Observatory's new anext command. You can now step over an await call, onto
the next line of your code.
pub
The pub run commands can now toggle checked mode, with --checked. Pub now
writes a .packages file when getting, upgrading, and globally activating
your packages.
Lots more
The Dart SDK 1.12 CHANGELOG
<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#1120> has lots
more details about various API tweaks. We look forward to your feedback
<https://github.com/dart-lang/sdk/issues>, so we can release 1.12 final.
Please test your packages and apps with 1.12 "RC0" and report issues
<https://github.com/dart-lang/sdk/issues>.
--
For more news and information, visit https://plus.google.com/+dartlang
To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.