You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Jump is an action, Target is not.
I agree that it's a bad "bad example" but only the fact that we have this conversation illustrate that function names don't have to be ambiguous.
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: