What is the difference between layer of abstraction and level of . . . Abstraction deals with simplification, indirection deals with location Abstraction is a mechanism that "hides" complicated details of a object in terms of simpler, easier to manipulate terms In programming, a good example is the difference in details between machine code and the various tools for creating applications that are ultimately based on machine code Consider creating a Windows
C++ Pointers: Number of levels of Indirection 2 Note that a linked list of 42 elements contains 42 levels of indirection for accessing the last element To get to the element of a one-element list, you use a single indirection: given a pointer to the list, you do something like p->data To get to the second element, two indirections are required: p->next->data Each arrow is an indirection
In C, is * an operator, or part of a type in a declaration? In C, * is called the indirection operator or the dereference operator I understand how it works when it is used in a statement It makes sense to write *p or * p, considering that it is a unary
abstraction - Are there any rules how the number of indirection layers . . . This is of course somewhat artificial example, but I hope it explains why I think that some developers time to time write too much of code, applying the indirection multiple times Are there any standard approaches to limit the proliferation of the indirection layers?
programming practices - Can too much abstraction be bad? - Software . . . The very first words of The C++ Programming Language, 4th edition: All problems in computer science can be solved by another level of indirection, except for the problem of too many layers of indirection – David J Wheeler (David Wheeler was my thesis advisor The quote without the important last line is sometimes called "The first law of Computer Science ")
Reference variable vs Alias - Software Engineering Stack Exchange Instead they attempt to introduce a second conceptual layer of indirection between the names and the storage - this notion of "aliasing" - which is distinct from the layer of indirection provided by pointers