Specs often need to convey to the reader a list of requirements. Typically in such a list, some requirements are more important than others. In fact, some may be absolute deal-breakers—either the requirement is met, or the whole concept falls apart. In other cases, a requirement might be purely optional.
Introducing RFC 2119! If you’re not already familiar with them, Request for Comments (RFCs) are the method by which so many of the Internet technologies we take for granted were proposed, refined, and implemented. Originating in 1969, RFCs are currently administered by the Internet Engineering Task Force.
Mr. Scott Bradner, of Harvard University, actually created an RFC to define the following words often found in specifications: "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL". The idea is to eliminate any possibility of miscommunication over which requirements need to be met, which can be skipped, and which need justification as to whether or not they can be skipped.
This RFC has gotten so much traction that even official organizations such as the National Institute for Standards and Technology (NIST) refer to it.
The heart of the RFC is short enough that I can reproduce it below. To see the entire RFC, please see: https://www.ietf.org/rfc/rfc2119.txt
1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification.
2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the definition is an absolute prohibition of the specification.
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.
4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label.
5. MAY This word, or the adjective "OPTIONAL", mean that an item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item. An implementation which does not include a particular option MUST be prepared to interoperate with another implementation which does include the option, though perhaps with reduced functionality. In the same vein an implementation which does include a particular option MUST be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides.)
Hopefully this RFC will improve communication by level-setting authors and readers of specs on these oft-used words. You SHOULD leave a comment if you like this list of definitions!