-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
"Bad example" follows established guidelines #102
Comments
"Target" can be a verb or noun hence the ambiguity. OnTargetting or OnBeginTarget would eliminate the ambiguity. |
Think of a function named "OnJumping". Does that happen when jump started, or when it ended, or every frame while jumping? Of course, we could write "OnBeginJump", at which point we've landed on shortening it to simply "OnJump", which we can all agree follows the established guidelines. The two first "good examples" are also nouns: OnDeath This leads me to believe that "OnTarget" is mistakenly listed as a "bad example", not that the whole category is incorrect. |
Jump is an action, Target is not. |
3.3.1.1 All Functions Should Be Verbs
Bad example has "OnTarget". However, "Target" is a verb
OnTarget isn't ambiguous. It fires when "this" has started targeting someone.
The text was updated successfully, but these errors were encountered: