Skip to content

Commit bbf5bf1

Browse files
munificentCommit Queue
authored andcommitted
Clean up the 3.8 CHANGELOG text.
Change-Id: If3aa70428ff6bd56ca0a90cc0f97b39e3f00251c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428401 Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Alexander Thomas <[email protected]> Reviewed-by: Alexander Thomas <[email protected]>
1 parent f891530 commit bbf5bf1

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

CHANGELOG.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,32 @@ or greater (`sdk: '^3.8.0'`).
5252

5353
[null-aware elements]: https://github.com/dart-lang/language/issues/323
5454

55-
The null-aware elements language feature enables a simple syntax for
56-
including an element into a collection only if the element is not
57-
null. The syntax is available for list elements, set elements, map
58-
keys, and map values as described in the
59-
[null-aware elements specification](https://github.com/dart-lang/language/blob/main/accepted/future-releases/0323-null-aware-elements/feature-specification.md).
60-
61-
The following is an example of a list literal written in both styles,
62-
without the null-aware elements language feature and with it:
55+
The null-aware elements make it easier to omit a value from a collection literal
56+
if it's `null`. The syntax works in list literals, set literals, and map
57+
literals. For map literals, both null-aware keys and values are supported. Here
58+
is an example a list literal written in both styles, without the null-aware
59+
elements language feature and with it:
6360

6461
```dart
65-
var listWithoutNullAwareElements = [
66-
if (promotableNullableValue != null) promotableNullableValue,
67-
if (nullable.value != null) nullable.value!,
68-
if (nullable.value case var value?) value,
62+
String? lunch = isTuesday ? 'tacos!' : null;
63+
64+
var withoutNullAwareElements = [
65+
if (lunch != null) lunch,
66+
if (lunch.length != null) lunch.length!,
67+
if (lunch.length case var length?) length,
6968
];
7069
71-
var listWithNullAwareElements = [
72-
?promotableNullableValue,
73-
?nullable.value,
74-
?nullable.value,
70+
var withNullAwareElements = [
71+
?lunch,
72+
?lunch.length,
73+
?lunch.length,
7574
];
7675
```
7776

77+
Full details are in the [feature specification][null-aware elements].
78+
79+
[null-aware elements]: https://github.com/dart-lang/language/blob/main/accepted/future-releases/0323-null-aware-elements/feature-specification.md
80+
7881
### Libraries
7982

8083
#### `dart:core`
@@ -83,19 +86,19 @@ var listWithNullAwareElements = [
8386

8487
#### `dart:io`
8588

86-
- Added support `HttpClientBearerCredentials`.
87-
- Update `Stdout.supportsAnsiEscapes` and `Stdin.supportsAnsiEscapes` to
89+
- Added `HttpClientBearerCredentials`.
90+
- Updated `Stdout.supportsAnsiEscapes` and `Stdin.supportsAnsiEscapes` to
8891
return `true` for `TERM` containing `tmux` values.
8992

9093
#### `dart:html`
9194

9295
- **Breaking change**: Native classes in `dart:html`, like `HtmlElement`, can no
9396
longer be extended. Long ago, to support custom elements, element classes
9497
exposed a `.created` constructor that adhered to the v0.5 spec of web
95-
components. On this release, those constructors has been removed and with that
96-
change, the classes can no longer be extended. In a future change, they may be
97-
marked as interface classes as well. This is a follow up from an earlier
98-
breaking change in 3.0.0 that removed the `registerElement` APIs. See
98+
components. On this release, those constructors have been removed and with
99+
that change, the classes can no longer be extended. In a future change, they
100+
may be marked as interface classes as well. This is a follow up from an
101+
earlier breaking change in 3.0.0 that removed the `registerElement` APIs. See
99102
[#53264](https://github.com/dart-lang/sdk/issues/53264) for details.
100103

101104
#### `dart:ffi`
@@ -126,21 +129,21 @@ var listWithNullAwareElements = [
126129
- Add a quick fix to create an extension method to resolve an "undefined method
127130
invocation" error.
128131
- Renaming a closure parameter is now possible.
129-
- Renaming a field now adjusts implicit 'this' references in order to avoid
132+
- Renaming a field now adjusts implicit `this` references in order to avoid
130133
name collisions.
131134
- Renaming a field formal parameter now properly renames known super-parameters
132135
in subclasses in other libraries.
133136
- Renaming a method parameter now properly renames across the type hierarchy.
134137
- The "encapsulate field" quick assist now works on final fields.
135138
- The "inline method" refactoring now properly handles inner closures.
136-
- The quick fix that adds names to a `show` combinator or removes names from a
137-
'hide' combinator can now add or remove multiple names simultaneously, in
138-
order to resolve as many "undefined" errors as possible.
139+
- The quick fix that adds names to a `show` clause or removes names from a
140+
`hide` clause can now add or remove multiple names simultaneously, in order to
141+
resolve as many "undefined" errors as possible.
139142
- The "remove const" quick fix now operates on more types of code.
140143
- The "add missing required argument" quick fix can now add multiple missing
141144
required arguments.
142145
- Add a new warning that reports an import or export directive with multiple
143-
'show' or 'hide' combinators, which are never necessary.
146+
`show` or `hide` clauses, which are never necessary.
144147
- Add a quick fix for this warning.
145148
- Add LSP document links for lint rules in analysis options files.
146149
- Add LSP document links for dependency packages in pubspec files.
@@ -171,9 +174,9 @@ Removed the `--experiment-new-rti` and `--use-old-rti` flags.
171174

172175
#### Dart Native Compiler
173176

174-
Added
175-
[cross-compilation](https://dart.dev/tools/dart-compile#cross-compilation-exe)
176-
for the Linux x64 and Linux ARM64 target platforms.
177+
Added [cross-compilation][] for the Linux x64 and Linux ARM64 target platforms.
178+
179+
[cross-compilation]: https://dart.dev/tools/dart-compile#cross-compilation-exe
177180

178181
#### Dart format
179182

0 commit comments

Comments
 (0)