We need to have a talk. A talk about data abstraction.
To what degree should you keep your data private? No, Iām not talking about the societal and security concerns of your personal data, but about your code: to what extent are the incidental decisions of data representation in one piece of code visible to another piece of code?
In theory, the widespread adoption of languages with support for object orientation, modularity and other partitioning constructs should have made developers aware of the practice and benefits of information hiding. In practice, most code makes incidental choices highly visible across codebases, with getters and setters for every field ā and public properties that might as well be public fields ā and changeable technical details leaked through interfaces.
This talk takes a lot of what data abstraction is, its history, its application, its appearance across different programming paradigms, its relevance in software architecture, dependency management, Domain-Driven Design, API evolution and agile development. Different languages (including C#, C++, Go, Python, JavaScript and lambda calculus) and habits and what they do to support and frustrate abstraction will be considered. For some, this talk will offer support for their current practices; for others, it may come as a reminder or as news.