dart-lang / dart-lang/language

Make void optional

Open
#2,465 2 comments 1 reaction 0 assignees View on GitHub
feature
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

Originally in sdk repository https://github.com/dart-lang/sdk/issues/34176

```
abstract class Executor {
O execute(I input);
}

void main() {
final exe = SomeExecutor();
final result = someExecutor.execute(null);
}
```

It is much clearer that the task above does not take an input, instead of a nullable input when doing ` someExecutor.execute();` So it'd be nice to have it **optional** for the times where you call execute explicitely and statically know the type.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked Dart SDK issue 34176 and the Executor example in this issue. Determine the language-design implications of allowing execute() to omit input for Executor; done means the proposal is resolved and the relevant Dart language specification behavior is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.