Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.7 language evolution update #6375

Merged
merged 4 commits into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading