comments can fill missing details

·

Comments can fill in missing details such as:

  • What are the units for this variable?
  • Are the boundary conditions inclusive or exclusive?
  • If a null value is permitted, what does it imply?
  • If a variable refers to a resource that must eventually be freed or closed, who is responsible for freeing or closing it?
  • Are there certain properties that are always true for the variable (invariants), such as “this list always contains at least one entry”?

Link:: A Philosophy of Software Design

Обратные ссылки