Saxon Genitive in naming conventions?

What do you call your functions when names containing the parent saxon, such as "Check task priority" and "Change argument argument" or "Increase action delay"?

Are you throwing an apostrophe? verifyTasksPriority(), changeArgumentsPriority(), increaseActionsDelay()

Do you drop both the apostrophe and the "s"? verifyTaskPriority(), changeArgumentPriority(), increaseActionDelay()

Are you replacing the genitive case of the saxon with "from"? verifyPriorityOfTask(), changePriorityOfArgument(), increaseDelayOfAction()?

I do not like the first option, because it seems that the function works on several things, and not on one thing. I do not like the second option, because it does not seem natural. I don’t like the third option, because the word in the function name just doesn’t sound right.

Which option are you using?

+5
source share
3 answers

I use the second one. That sounds good to me. Think of “task priority” as a compound word, such as “vacuum cleaner”.

+9
source

I find that numbers two and three sound good to me and are descriptive. I am using the second option. The first option can be confusing, as it seems to indicate that it is working with a collection, and not with a single item (for example, Tasks instead of tasks).

However, I did not know that I was involved in Saxon ingenious programming; I will add this to my resume immediately.

+2
source

, - .

OO-, OO, task.verifyPriority(), task.verify() .

- , 7, - . Bob 7 , verifyOwner() , , verifyPriority(), , ?

, API-, , .

, OO, <library>_<Noun>_<Verb>, tman_task_verify ( task_t* self ), , .

+1

All Articles