Pointers can be avoided when developing high-level language paradigms — for example, take Java, but they tend to reappear in real-life practical implementations of the functions that the language claims to provide.
Unless you are using some kind of dynamically reconfiguring FPGA architecture, a colony of state machines, or a similar idea like your computer, the actual computers are not very object oriented. We do not perform operations on the storage device, instead, we obtain data, perform calculations on it and write them back. To find data in memory, we use the concept of an address (there are things called content-addressable memories, but for most purposes they are not preferable). After you decide that your data (or the body of the function or structure containing both) is in memory at some address, you need to find out how you are going to process the address. You can write the address in another memory location, and we have the most familiar pointer concept. You can save the address on the stack, but it's just storage relative to the register called the "stack pointer". Or you can save the address in a register or instruction word.
But if you look at the actual format of the instruction word, for non-trivial processors, “registers” are actually numbered locations in a special internal memory called a register file. The RISC tradition of numbering them makes this especially obvious, but this is true even in assembly language circuits, where registers are called - MOV or any instruction will have several bits that determine the type and format of the instruction, and several bits that encode the register number for each operand. Therefore, registration of indirect addressing is technically one memory cell containing the address of another, that is, a pointer. Similarly, the address of a data element that is directly encoded in a command word is also an example of one memory cell (program memory containing the command word) relating to another, where the data is actually stored.
Conclusion: you can hide pointers from a high-level programmer, but so far your implementation is based on
(address data memory / register file) ↔ CPU - ↔ (address program memory)
the idea of ​​computing, you cannot avoid them at the implementation level.
source share