Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named arguments #40

Open
jayconrod opened this issue Feb 18, 2017 · 0 comments
Open

Named arguments #40

jayconrod opened this issue Feb 18, 2017 · 0 comments

Comments

@jayconrod
Copy link
Owner

It should be possible for callers to write the names of some of the arguments being passed to a function. This will be particularly useful for functions with a lot of parameters, especially if many of them have default expressions. Named arguments don't need to be passed in order. No unnamed arguments can be passed after the first unnamed argument.

def f(a: Object, b: String, c: i32 = 1, d: i32 = 2, e: i32 = 3)
f(Object(), d = 4, c = 3, b = "foo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant