Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

The context of this question is naming a function in programming. I'd like to find a good name for a function that takes a parameter of type prerequisite.

For instance, if I have a function that takes a parameter of type requirement, then the name of it could be require.

But what would be a good corresponding name when the parameter is a prerequisite?

share|improve this question
1  
You could just use prerequire. Perhaps it doesn't exist, but ultimately meaning is what's important and if you think that's clearer in the context of what you're doing than substituting with an entirely different word which may be less concise, then stay with that. –  Neil Jun 29 '11 at 9:39

4 Answers 4

Unfortunately, "require" is to "prerequisite" as "require" is to "requirement", since a prerequisite is essentially a requirement.

However, you should name a function for what it does, not for what parameters it takes. If you prefer long function names, ensure_prerequisite_is_met() would do; if you like them shorter, check_prereq().

share|improve this answer
    
Or maybe "require as prerequisite" –  GEdgar Jun 29 '11 at 14:13
    
@GEdgar: the trouble with require as a function name is that it's more of an assertion than an action. require_prerequisite(X) doesn't hint at what happens if X doesn't exist, or even what happens if it does. –  user1579 Jun 29 '11 at 14:32

A prerequisite means something that is required beforehand, and there is no single verb to express that. You would have to specify both require and when it should be required, for example RequireBeforeInstallation, or use EnsureRequirementsBeforeInstallation.

share|improve this answer

In the computing context we would say "x depends upon y" if y is a pre-requisite for x. This may or may not extend to wider usage. In a job context, you'd just use "requires", as in "to be a doctor requires a medical degree". The pre part is implicit.

share|improve this answer

A good corresponding name could be:

Require beforehand.

It's easier to understand, and its a very short way of stating it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.