5 Files

The majority of advice in Chapter 1 also applies to files in packages. Important differences are described below.

5.1 Names

  • If a file contains a single function, give the file the same name as the function.

  • If a file contains multiple related functions, given them it a concise, but evocative name.

  • Deprecated functions should live in a file with deprec- prefix.

  • Compatibility functions should live in a file with compat- prefix.