Skip to content

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.

4 participants