3 ms·
I am extremely convinced with all points in article apart from the model that author proposes, which I am not sure I quite get it. I think the definition of poi
by kulu2002 8y ago
I am extremely convinced with all points in article apart from the model that author proposes, which I am not sure I quite get it.
I think the definition of pointer becomes more and more abstract as you move from hardware level to more high-level languages.
In languages like C/C++ (Not aware of Rust) which lie in middle (higher than assembly where pointer is just a hw register and lower than say Java having no pointers per se) the definition of pointer is not so clear.
The other source of confusion is syntax of pointer in C/C++ and fact that they can be used interchangeably with arrays and arithmetically manipulated.
Pointers are indeed complicated and thats why standards like MISRA C / autospice restricts use of pointers to great extent.
In highest level languages like MATLAB for model based development, the inputs outputs are treated in form of Arrays at user level. When autocode is generated from these models compilers internally transform array operations into pointer operations, essentially making the array-based source code into object code that's as efficient as the pointer version. The advantage is that the pointer-oriented compiler-generated code is created in a controlled fashion.