3 ms·
In my opinion the "killer feature" of OOP at scale, more than hierarchy, it's compartmentalization of code. Class hierarchies tend to have issues at scale, but
by lou1306 6y ago
In my opinion the "killer feature" of OOP at scale, more than hierarchy, it's compartmentalization of code.
Class hierarchies tend to have issues at scale, but OOP makes people agree on "where should we put this block of code" in a way that's "intuitive" and scales.
- creatonez 6y ago> OOP makes people agree on "where should we put this block of code" in a way that's "intuitive" and scales. This is the opposite conclusion of Brian Will's Object-Oriented Programming is Bad video. Since it forces you to think about everything as a real-world "object", OOP often leads to philosophical debates like Should a Message send() itself? Should a Sender send() Messages? Should a Receiver receive() Messages? Should a Connection transmit() Messages? With more and more abstract OOP constructs with more and more interaction with the rest of the program, knowing where to put the relevant code becomes more and more difficult. FizzBuzzEnterpriseEdition[1], while it is satire, is quite similar to a lot of large Java codebases that have been through the wringer of alternating cycles of OOAD and code rot. Try to find the right bit of code to edit if you wanted to add a new feature to FizzBuzzEnterpriseEdition. Not very easy. --- [1] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...