computer-scienceindirection

What does "level of indirection" mean in David Wheeler's aphorism?


I've read this quote in a book:

There is no problem in computer science that can't be solved using another level of indirection.

Can someone explain that? What does "level of indirection" mean?

From what I understood, indirection is a fancy name for using a pointer of a value instead of the value itself. Please clarify this for me.


Solution

  • "Indirection" is using something that uses something else, in its broadest sense.

    So your example, using a pointer of a value instead of the value, fits this definition at one level. The pointer is the something and the value is the something else.

    Typically this is something larger in scope:

    This last example, perhaps, explains the "why" of it all.

    As we work with something we master it and learn how to abstract it to a higher level of abstraction, thus a new level of indirection is needed and we can solve bigger problems faster by offloading some of the work to the new API.