3 ms·
I once read about pointer implementations in C compilers for Lisp machines (Zeta-C, I believe). As I recall, they were implemented as a pair consisting of a vec
by bitwize 11y ago
I once read about pointer implementations in C compilers for Lisp machines (Zeta-C, I believe). As I recall, they were implemented as a pair consisting of a vector of objects and an index into the vector. Casting between pointer types must have been a royal bitch, if it were implemented at all.
So yeah, major lesson learned: C pointers are not necessarily equal to hardware addresses.
but you should really be using c++ and iterators or smart pointers anyway
- Grishnakh 11y ago>but you should really be using c++ and iterators or smart pointers anyway Not if you're writing an OS kernel, or any low-resource embedded code.