Skip to content

Commit

Permalink
3.7 language evolution update (#6375)
Browse files Browse the repository at this point in the history
Fixes #6347 

---------

Co-authored-by: Parker Lougheed <[email protected]>
  • Loading branch information
MaryaBelanger and parlough authored Jan 31, 2025
1 parent f0cd3c6 commit 9c90d7c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/content/resources/language/evolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,40 @@ on the Dart language GitHub repo.
## Changes in each release
### Dart 3.7
_Unreleased_
Dart 3.7 added support for [wildcard variables][] to the language.
A wildcard variable is a local variable or parameter named `_`.
Wildcard variables are non-binding,
so they can be declared multiple times without collisions.
For example:

```dart
Foo(_, this._, super._, void _()) {}
```

The `dart format` command is also now tied to the language version as of 3.7.
If the language version of an input file is 3.7 or later, the code is formatted
with the new tall style.

The new style looks similar to the style you get when you add trailing commas
to argument lists, except that now the formatter will add and remove those
commas for you. When an argument or parameter lists splits, it is formatted
like so:

```dart
longFunction(
longArgument,
anotherLongArgument,
);
```

You can find more details in the [changelog][dart-format].

[wildcard variables]: /language/variables#wildcard-variables
[dart-format]: {{site.repo.dart.sdk}}/blob/main/CHANGELOG.md#dart-format

### Dart 3.6
_Released 11 December 2024_
| [Dart 3.6 announcement](https://medium.com/dartlang/announcing-dart-3-6-778dd7a80983)
Expand Down

0 comments on commit 9c90d7c

Please sign in to comment.