On Objects and Data Structures
Karan Chawla / April 12, 2021
1 min read
A class should not simply expose it's data via getters and setters, but it should expose abstract interfaces that allow the users to manipulate the essence of the data.
The dichotomy between data structures and objects —
- “Procedural code (code using data structures) makes it easy to add new functions without changing the existing data structures. OO code, on the other hand, makes it easy to add new classes without changing existing functions.”
Subscribe to the newsletter
Get emails from me about future of technology, philosophy, and human behavior.