forked from mkhan45/RustScript
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
Function spread argument syntax #16
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestsyntaxLanguage design related issuesLanguage design related issues
Description
Activity
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsyntaxLanguage design related issuesLanguage design related issues
Functions have a fixed set of defined parameters, but in some cases we might want to give a function any amount of arguments.
There is therefore a need for some argument spread syntax similar to JavaScript or the
paramskeyword in C#.This would functions with the spread syntax have a minimum airity but no maximum, casting all arguments after the one with the params keyword or spread syntax to a list: