I have some class
MyClass
MyClass which has two methods:
Lock(){}
and
Unlock(){}
So far so good.
Because ofFor some reasons, the two methods are to be unified into one, with an additional parameter for indicating the action.
What should be the name of the parameter?
SetLockState(bool isLock)
or
SetLockState(bool isLocked)
// or another better name?
or other?
This happens a lot in our code base, and. I favor isLock, because it is the new state, but it seems there is some convention about isLocked which I am unfamiliar with, and.
I would love an explanation as to why isLocked is the standard. And I would like to know if there is any objective argument that can support the choice of the parameter name.