dart-lang / dart-lang/language
Syntax for optional parameters and required named parameters is verbose and unfamiliar
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
The current syntax for optional positional parameters is:
```dart
foo([bool optional = false])
```
The current syntax for required named parameters is:
```dart
foo({@required bool optional = false})
```
Both syntaxes are not used in any other mainstream language that I know of and are unnecessary verbose compared to possible alternatives.
Contributor guide
Research direction
Review the issue's examples of optional positional and required named parameter syntax and the discussion that follows them. Determine whether a concrete alternative has been agreed on; done would require a settled language-design proposal, but no files, tests, or implementation entry points are identified here.
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
- Needs clarification
- Newbie friendliness
- 25/100