-
Notifications
You must be signed in to change notification settings - Fork 26
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
PPC0033: method-like calls to lexical subs #68
base: main
Are you sure you want to change the base?
Conversation
Add a syntax $object->&method(@Args) that calls method as a sub, to allow a nicer syntax for private methods.
I think the "Future Scope" section should be part of the current scope of this PPC. If it were, I'd fully support it. |
I will clarify that this should work for public methods in the class syntax, but I had put that in the future scope section because |
I've had a go at implementing the |
Methods under the "class" syntax would also be callable using this syntax. Lexical methods currently don't exist, but they would be callable with this syntax if they were added.
I'm definitely in favour of this. In fact if it were merged soon I'd like to get an implementation of it added in with my |
Add a syntax
$object->&method(@args)
that callsmethod
as a sub, to allow a nicer syntax for private methods.