16 ms·
I prefer the data representation comes first, especially in a language like C++. Maybe you can represent 1000 squares with 1000 integers. If you need polymorph
by humanrebar 9y ago
I prefer the data representation comes first, especially in a language like C++.
Maybe you can represent 1000 squares with 1000 integers. If you need polymorphism on top of that, there are plenty of approaches without rearranging or copying the data to make it fit a type taxonomy.