Function Slugs

  • by David Spuler, Ph.D.

Function Slugs

Functions are an important building block of your code. Some ways to get the slugs out of functions include:

  • Declare small functions inline.
  • Avoid recursion.
  • Pass objects by reference.
  • Avoid function pointers.
  • Specialize functions with default arguments.