Skip to content

abstract.xml Fix the error in the last example and CS #4149

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

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

mmalferov
Copy link
Member

The only thing I'm not sure about is whether one empty line is required between the hooks that contain the implementation. With an empty string, readability seems to be better.

If we imagine that hooks are the same as methods, then, perhaps, it is better to leave one empty string between the "methods" :)

In this case, it might be better to add one empty line between hooks without implementation

The only thing I'm not sure about is whether one empty line is required between the hooks that contain the implementation. With an empty string, readability seems to be better.

If we imagine that hooks are the same as methods, then, perhaps, it is better to leave one empty string between the "methods" :)
Copy link
Member

@kamil-tekiela kamil-tekiela left a comment

Choose a reason for hiding this comment

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

Was the error only s/arguments/parameters?

@mmalferov
Copy link
Member Author

Was the error only s/arguments/parameters?

No, it's not the s, it's the terms. It is impossible to define arguments in the method signature, arguments are the actual values that come to the method from the outside. Only parameters are allowed to be defined in the method body.

I will allow myself one quote there:

The two terms are used interchangeably in conversation, but they mean different things. You pass arguments when calling a method. And you use parameters within the method body.

As most if not all programming languages are copy-by-value, the two are equivalent, only differing in the context. The two terms exist to distinguish whether you are talking about a method definition or a method call. When you're calling a method, you pass in arguments. When you're actually in the method body, you are using parameters. Arguments get copied-by-value to parameters

Try to think of arguments as actually non-named values that are sent to the method, and of parameters as an integral part of a function or method, and you will no longer be able to say that "optional arguments have been defined in the method" :)

@kamil-tekiela
Copy link
Member

Was the error only s/arguments/parameters?

No, it's not the s, it's the terms. It is impossible to define arguments in the method signature, arguments are the actual values that come to the method from the outside. Only parameters are allowed to be defined in the method body.

I will allow myself one quote there:

The two terms are used interchangeably in conversation, but they mean different things. You pass arguments when calling a method. And you use parameters within the method body.
As most if not all programming languages are copy-by-value, the two are equivalent, only differing in the context. The two terms exist to distinguish whether you are talking about a method definition or a method call. When you're calling a method, you pass in arguments. When you're actually in the method body, you are using parameters. Arguments get copied-by-value to parameters

Try to think of arguments as actually non-named values that are sent to the method, and of parameters as an integral part of a function or method, and you will no longer be able to say that "optional arguments have been defined in the method" :)

FYI https://phoenixnap.com/kb/sed-replace

What I meant was: was swaping the word arguments for the word parameters the only meaningful change in this PR. I understand why you did it, I just wanted to make sure I didn't miss anything more important.

@mmalferov
Copy link
Member Author

Oh, yes, the sed, now everything is clear. And I also thought: why is the sentence so strangely composed :))

Copy link
Member

@kamil-tekiela kamil-tekiela left a comment

Choose a reason for hiding this comment

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

LGTM!

@kamil-tekiela kamil-tekiela merged commit 984188e into php:master Nov 27, 2024
2 checks passed
@mmalferov mmalferov deleted the patch-271515 branch January 20, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants