1

When I write the following sentence, the grammar/spelling checker running on my Mac always suggests me to use prefixed to or prefaced with.

Functions implemented by a module should always have their names prefixed by the module name.

What I mean is that, if the module name is user, the function name should not be load(), but user_load().

Is it correct to use prefixed by, or should I use another phrase?

7

Both prefixed to and prefixed by are correct, but they have different meanings.

If A is prefixed to B, A is the prefix and B is what the prefix is added to. In this case the end result is A_B. To use your example, you could say that user is prefixed to load() to create user_load().

If A is prefixed by B, B is the prefix and A is what the prefix is added to. The result is B_A. For your example, you would say that load() is prefixed by user to create user_load().

To state this in more general terms for your entire project, you might make either of these statements:

Each method name related to the user object is prefixed by the string user.

The string user is prefixed to each method name related to the user object.

And concerning the sentence in your question:

Functions implemented by a module should always have their names prefixed by the module name.

It is indeed correct, because the suffix (function name) is prefixed by the prefix (module name).

| improve this answer | |
  • 1
    What about 'prefixed with'? – NS.X. May 21 '13 at 21:31
  • 1
    @NS.X. "prefixed with" is not ungrammatical, but it is uncommon and, in the kiam case, would not be used. – user114 May 21 '13 at 21:55
  • @Carlo I agree that it's not the best choice in this case (as Wendi says, "by" is better), but I disagree that "prefixed with" is uncommon. I think it's actually more common. – snailplane May 22 '13 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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