dart-lang / dart-lang/language

Feature Request: Variable Number of Arguments

Open
#1,014 50 comments 211 reactions 0 assignees View on GitHub
request
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

_This issue was originally filed by ador...@gmail.com_

---

It would be nice to have variable numbers of arguments, a la python splats.

This would make porting python code to dart much cleaner.

For example, I would like to do something like this:

```dart
void myFunc(arg1, arg2, *anyRemainingArgs){
var extraArg1 = anyRemainingArgs[0];
var extraArg2 = anyRemainingArgs[1];
...
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the issue discussion and the Dart language specification context for function arguments. Determine the syntax and semantics required for Python-style variable arguments, including how remaining arguments are represented; done means the language-design questions are resolved and the accepted behavior is captured in the specification.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.