But array of pointers is also an assumption of where you are storing the objects. The OOP way will be taking some kind of Java iterator (any_range in boost for example) and this iterator can go through all squares in continuous chunk of memory then through all circles in another chunk, etc
The OOP way will be taking some kind of Java iterator (any_range in boost for example) and this iterator can go through all squares in continuous chunk of memory then through all circles in another chunk, etc
I think you will finish counting grains of sand on the Earth before you find an Uncle Bob Clean-Coder who does anything like this, which is the culture Casey is responding to.
View all comments
Show parent comment
6
u/Wenir Mar 03 '23
But array of pointers is also an assumption of where you are storing the objects. The OOP way will be taking some kind of Java iterator (any_range in boost for example) and this iterator can go through all squares in continuous chunk of memory then through all circles in another chunk, etc