Re:Was object-oriented programming a failure? (2015)
by geophile on Sunday March 12, 2017 @12:22PM
(#13851353)
A class that holds data and has no methods other than get/set is basically a struct. Why even bother with the get/set methods?
You assert that code based on this approach is easier to understand, but you don't give a reason why this is so.
This sounds a lot like a pre-OO approach to organizing code and data, and I don't understand the benefits. To use the tried-and-true example: I want my stack state and code to go together. Why would I want to expose the stack state, and keep the code manipulating it separate?
You assert that code based on this approach is easier to understand, but you don't give a reason why this is so.
This sounds a lot like a pre-OO approach to organizing code and data, and I don't understand the benefits. To use the tried-and-true example: I want my stack state and code to go together. Why would I want to expose the stack state, and keep the code manipulating it separate?