Comment by groundzeros2015
1 day ago
> While OOP ideology teaches you to structure the program after the problem it solves
I completely disagree with this characterization. OOP teaches you a synthetic set of concepts (go4) and then asks you to solve problems in terms of that.
And the reason why the canonical bird as a subclass of animal doesn’t work, is it’s extremely difficult to divide the world into strict categories (are you Aristotle). So the solution is to organize virtually rather than around natural traits.
The most natural way to solve a programming problem is a big list of instructions with if/else and goto. It’s very learnable, even for young children.
OOP is not Singleton, it is "class Car extends Vehicle {Tyre tyres[4]}" etc
I responded to that. It’s nonsense which doesn’t work:
> And the reason why the canonical bird as a subclass of animal doesn’t work, is it’s extremely difficult to divide the world into strict categories (are you Aristotle)
What behavior are you going to out in vehicle? Here are a few potential subclasses you’ll need to consider:
- hang glider
- wheelies
- train
- skis
- lawn mower
- windsurfing board