3 ms·
Who doesn't go into the implementation with the solution worked out? I think that's not the problem. I think it's just that different things have different lev
by makmanalp 13y ago
Who doesn't go into the implementation with the solution worked out?
I think that's not the problem. I think it's just that different things have different levels of complexity, and your representation should match what you want to do.
There is a lot of "real world" computation where it makes more sense to do things the "mathy way" rather than representing them with objects.
- ak39 13y agoI think the point being made is that we use OOP to provide a natural abstraction of the real world to the end user. In this Towers problem: it would be like building the Towers game for an end user to play with - not solve it for the user.
- Fargren 13y ago>>Who doesn't go into the implementation with the solution worked out? OOP, as Allan Kay envisioned it, is about making developing software a process of learning about what you are modeling. You are expected to naturally find the solution to your problem as you model it, not to have a worked up a solution you have to put into the code. With real-world sized problem, this approach gives good results. But, obviously, it can fail to find some great solutions. As is the case for the Hanoi problem: you can model it very well without finding the optimal solution to it. But the model still has some added usefulness.
- noblethrasher 13y agoThis is exactly right. Alan Kay said something to the effect that the reason he invented OOP is because he hated algorithms (and data structures). Indeed, one of his criticisms of Java-style OOP is that, by using setters, it "turns objects back into data structures".