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

Document invocant in method signature #1495

Merged
merged 2 commits into from Sep 2, 2017

Conversation

@zakame
Copy link
Contributor

@zakame zakame commented Sep 2, 2017

Add documentation on setting invocant in method signatures, using type
constraints to define class and object methods, and using multi
declarator for defining same-name class and object methods.

Fixes #1121.

Add documentation on setting invocant in method signatures, using type
constraints to define class and object methods, and using multi
declarator for defining same-name class and object methods.

Fixes #1121.
@zakame
Copy link
Contributor Author

@zakame zakame commented Sep 2, 2017

Took a bit longer than I expected, as I realized it needs documenting the concept of invocant first, and a slight peek at type constraints, to better illustrate the entire concept.

Let me know if it needs more tuning, or more 🍕

Copy link
Collaborator

@moritz moritz left a comment

Very nice pull request, just needs a s/comma/colon/ in one place.

@@ -264,6 +264,54 @@ Method names can be resolved at runtime with the C<.""> operator.
A.new."$name"().say;
# OUTPUT: «(Any)␤»
A method's signature can have an I<invocant> as its first parameter
followed by a comma, which allows for the method to refer to the object

This comment has been minimized.

@moritz

moritz Sep 2, 2017
Collaborator

This should be "colon", not "comma".

This comment has been minimized.

@zakame

zakame Sep 2, 2017
Author Contributor

Doh! 🤦‍♂️ Thanks for the catch @moritz !

@moritz
moritz approved these changes Sep 2, 2017
@moritz moritz closed this Sep 2, 2017
@moritz moritz reopened this Sep 2, 2017
@moritz moritz merged commit 1e20a10 into Raku:master Sep 2, 2017
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@zakame
Copy link
Contributor Author

@zakame zakame commented Sep 2, 2017

Thanks again @moritz !

@zakame zakame deleted the zakame:document-method-invocant-and-multi branch Sep 2, 2017
@moritz
Copy link
Collaborator

@moritz moritz commented Sep 2, 2017

Thank you for your contribution @zakame! You should have received an invitation to the "perl6" team, which allows you to push to the doc repo (and others) directly.

@zakame
Copy link
Contributor Author

@zakame zakame commented Sep 2, 2017

Yep, just saw it, many thanks! 😸

@ronaldxs
Copy link
Contributor

@ronaldxs ronaldxs commented Sep 2, 2017

Suggestion: the new patch should be in a separate section titled/labeled "Class and Instance methods" after the "method" and "self" sections. I think having a new section better fits the structure of the surrounding pieces of the OO document.

@zakame
Copy link
Contributor Author

@zakame zakame commented Sep 2, 2017

@ronaldxs yeah I was mulling that too, thanks for suggesting 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.