How to discern between 'set' imperative and 'set' past tense?
I have a telegram convention, where whenever an action must be taken, it uses a verb in its name. I then use the imperative for the request and past tense for the reply, e.g.: orderStart
to start an order, then reply with orderStarted
.
The trouble I have now, is what to do with the verb set
, e.g. flagSet
. I played a little with flagSetted
, but that feels very wrong. Is there perhaps some kind of synonym, or another option?
Solution 1:
You can use other verbs with similar meaning, such as activate or toggle.
There are also other conventions you can use. You may use something like flagIsSet or isFlagSet, for example.
Solution 2:
I've decided that my comment may be worthy of a reply, and I think the solution boils down to how you are conjugating the verbs. (But note that I am not a grammar person - this is just my opinion which may or may not be 100% correct)
First of all I feel that the command should be the "imperative" and not the "present" tense. As you are telling the subsystem what to do.
But the big problem is that from your examples you want to use the "Preterite" to describe the past tense and are trying to force the preterite form of "Start" onto "Set". Grammatically I believe that this is plain wrong and results the awkward "Setted" form.
But you can get a grammatically better (and non-awkward) form if you consider the full conjugations of the verbs and perhaps look to the "Past Perfect" conjugation of the verbs - and here are links to the conjugations of Start and Set
This shows for example the "Past Perfect (third person singular)" being:
He/She/It had set
He/She/It had started
And here it all goes down hill as I just realized that this is using the totally wrong verb in the first place for the response. While you should be using the imperative of Start and Set as commands, what you are returning is the state of the action and not a description of the action performed. Hence the verb you should be conjugating is To be with the past participle of the associated verb.
Thus we come to the third person singular preterite form of "to be" which result in:
It was started
It was set
So IMHO the commands and response for your telegrams should be:
orderStart / orderWasStarted
flagSet / flagWasSet
While they may be slightly longer than what you desire, they are more grammatically correct and