0

Let's say we are talking about some software application:

The input data are invalid, so an error can occur

The input data are invalid, so an error may occur

The input data are invalid, so an error might occur

What is the right modal verb here: "can", "may" or "might"?

1

The usual form would be will occur, because the program will do the same thing for the same input. As this is habitual, it's also common to see present tense: occurs.

Which modal verb you choose depends on what you want to emphasise:

  • Use can to emphasise that the program is capable of detecting some error. "The program can generate an error if the input is nonsensical, such as a temperature below 0 Kelvin"
  • Use will or does to emphasise that the program is certain to detect something: "The program will generate an error if you enter a negative number". (Also habitual present tense: "The program generates an error ...")
  • Use may or might for uncertainty. It's a shade of meaning, but "may" leans towards "ignorance" and "might" leans towards "probabilistic". "The protocols may generate error conditions" and "Some packets might be lost and cause errors".

Here's an example sentence which uses them all: "As internet packets might be reordered, duplicated, or lost, and the remote system may have bugs, our program can detect these conditions when they occur and will generate error messages on unacceptable data."

Note that while statisticians, physicists etc normally use "data" as plural, with singular "datum", computer programmers almost always use "data" as uncountable. Statisticians: "The data are incorrect because the last datum is erroneous"; Programmers: "The data is incorrect because the last input is erroneus".

  • Thank you very much! The middle part of your answer is of most interest for me. But it is a little bit vague when to use which of those three modal verbs. Could you please provide more guidelines? Are "may" and "might" interchangeable in that context? – embedc Jul 8 '19 at 13:37
  • I rewrote the middle, hope that's helpful. – jonathanjo Jul 8 '19 at 13:51
  • If you're a computer programmer interested in modal verbs, you might well be interested in this document ietf.org/rfc/rfc2119.txt which describes when to use MUST, MAY etc in specifications. – jonathanjo Jul 8 '19 at 13:53

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.