T O P

At what point should a 2D Array become a Vector of Objects?

At what point should a 2D Array become a Vector of Objects?

yel50

OOP doesn't have anything to do with it. whenever you read data from anywhere, it's always better to read it into a data structure that represents the data instead of some generic blob. in languages with OOP support you can use classes. in ocaml/f# it would be a new type. in purely dynamic languages you can throw it all into a map, but there's a reason typescript is used a lot, python added type hints, and clojure has spec. the generic blob approach doesn't scale.