Re:Handles Are the Better Pointers
by scotty79 on Wednesday June 21, 2023 @03:18PM
(#36423043)
I've seen an argument that collections of objects should be allocated field-wise. So an array of points would actually be two arrays, one for x-es, one for y-s addressed by index of the object in the collection.
I wonder how programming would look if that was the default mode of allocation in C++. Pointers to objects wouldn't make much sense then.
I wonder how programming would look if that was the default mode of allocation in C++. Pointers to objects wouldn't make much sense then.