Learn English – may not vs. must not

modal-verbsusage

Source: Eloquent JavaScript: A Modern Introduction to Programming, 2nd Edition by Marijn Haverbeke

Example:

Variable names can be any word that isn't reserved as a keyword (such as var). They may not include spaces. Digits can also be part of variable names—catch22 is a valid name, for example—but the name must not start with a digit. A variable name cannot include punctuation, except for the characters $ and _.

may not sounds almost like you may do it if you want to, but if you don't feel like doing it, you may not do it. At least, that's what it sounds like to me. But in programming, there is no place for the may-or-may-not type of attitude. It is always "you must" or your program will be syntactically incorrect and thus won't run. I think that's a very relaxed way to say that you categorically must not do something because it simply will not work if you do. Why not use the modal verb must instead? may not is a very weak type of negation compared to must. Do you think it is totally legal to use may not in the context of exact sciences like math and programming?

Best Answer

You need the permission of the compiler for things to be accepted, and the compiler is denying you that permission. "May I do this?" "You may not."

May is just as strong as must. It's only weak in the positive sense, where once you're granted permission, you're not obligated to do it.

Related Topic