Previous Page
Next Page

B.2. Chapter 3, Naming Conventions

  • Use grammatical templates when forming identifiers. [Identifiers]

  • Name booleans after their associated test. [Booleans]

  • Mark variables that store references with a _ref suffix. [Reference Variables]

  • Name arrays in the plural and hashes in the singular. [Arrays and Hashes]

  • Use underscores to separate words in multiword identifiers. [Underscores]

  • Distinguish different program components by case. [Capitalization]

  • Abbr idents by prefx. [Abbreviations]

  • Abbreviate only when the meaning remains unambiguous. [Ambiguous Abbreviations]

  • Avoid using inherently ambiguous words in names. [Ambiguous Names]

  • Prefix "for internal use only" subroutines with an underscore. [Utility Subroutines]

    Previous Page
    Next Page