Skip to content

Allow named function arguments anywhere in the argument list #1072

@lrhn

Description

@lrhn

Since named arguments are distinguishable from positional ones, allowing named arguments to be placed anywhere in the argument list can be done without changing calling semantics.

It is an advantage in some cases where you want to put a function argument last. Example:

expectAsync(() {
  ...
}, count: 2);

would be more readable as:

expectAsync(count: 2, () {
  ...
});

Metadata

Metadata

Labels

featureProposed language feature that solves one or more problemssmall-featureA small feature which is relatively cheap to implement.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions