-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Update methods.md #53948
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
base: master
Are you sure you want to change the base?
Update methods.md #53948
Conversation
Added a description of "anonymous arguements" in methods.
doc/src/manual/methods.md
Outdated
| ### Methods with anonymous arguments | ||
|
|
||
| Methods can be defined with anonymous arguments, where the value of the argument is not bound to a variable. | ||
| This pattern can be helpful for indicating that the behavior of the function with respect to that argument only depends on the type of the input and not its value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe wrap this line (I think generally lines should have < 100 chars, though I am not sure if this is a written rule; but it is certainly something the rest of this file adheres to).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
|
@fingolfin, are you or somebody else able to merge this PR? |
|
Should we merge? |
|
@KristofferC ok to merge? |
Added a description of "anonymous arguments" in the methods section of the manual, based on this forum discussion:
https://discourse.julialang.org/t/defining-methods-without-binding-variables/112485
This PR chooses a name for the pattern of defining methods without binding values to variables ("anonymous arguments"), and it describes the use of this pattern.
Someone with a better understanding of the intention of this functionality should review this, as I'm writing it from the perspective of a user rather than a developer.