What Do We Name?

In this chapter we’ll spend some time thinking, as programmers, about what we name and how we name it. First: What? The things we name most often while writing code are:

  • Variables

  • Functions

  • Types (classes, enums, structs, typedefs)

  • C++ namespaces and Java packages

  • Macros

  • Source files

This list is by no means exhaustive—there are other, higher-level entities we’ll give meaningful names to: states of a state machine, parts of messaging protocols, database elements, application executables, and so on. But these six are enough to start with.

Get Code Craft now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.