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

Language feature: named arguments in function calls #646

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

TwitchBronBron
Copy link
Member

Initial proposal for named arguments in function calls.

Copy link

@livecano livecano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to omit a name if maybe prefix with an underscore?

@neilsb
Copy link

neilsb commented Jul 26, 2022

Sorry for the delay in looking at this - was away on vacation.

This all looks great and seems comprehensive. Personally not keen "Named arguments after ordered parameters", as for clarity I would argue they should either all be named, or none (all be left in the default order) - however may well not be everyone's thinking. :)

@TwitchBronBron
Copy link
Member Author

Sorry for the delay in looking at this - was away on vacation.

This all looks great and seems comprehensive. Personally not keen "Named arguments after ordered parameters", as for clarity I would argue they should either all be named, or none (all be left in the default order) - however may well not be everyone's thinking. :)

I think most of that could be enforced by a linter rule..I modeled a lot of this design off of the C# docs.

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants