2 ms·
I think you mistake general Objects, and their sub”class” data objects. Data oriented design is popular now, but it is just a subcategory. As a base, OOP is rea
by kaba0 6y ago
I think you mistake general Objects, and their sub”class” data objects. Data oriented design is popular now, but it is just a subcategory. As a base, OOP is really great, class invariants and encapsulation is the only effective weapon against complexity (and software engineering is largely about managing complexity).
Data classes that expose their internals are a great way for some program logic, but let’s say a database connection is very much not a simple data class. It does have some static data, but it should not be accessible to the outside, because then it is not safe to close/use/whatever.
- js8 6y agoActually, "data-oriented design" is very old, if you look how some old COBOL apps are written, what JCL was about, etc. But I think you completely missed my overall point about being patronising, meaning, the idea that the author of the language/library knows better than the user of the language/library. The reason why Java is so guilty of this is that its other competitors at the time (C++, Common Lisp, Python) at least acknowledged other paradigms than OOP, and were not so fundamentalist about it. (Smalltalk is a notable exception, but it is not as patronising in other ways as Java is. But in general, OOP tends to be patronising because its central tenet is that the definition of the object should alone determine its properties, they shouldn't be changed/imposed from the outside. Which is a good rule of thumb, but sometimes in practice becomes an obstacle.)