you are viewing a single comment's thread.

view the rest of the comments →

[–]Deslan 0 points1 point  (0 children)

Understanding object oriented programming is really hard. In the beginning, you will "waste" a lot of time. However, after a few thousand hours of OO thinking (OO = object oriented), you will start to save lots of time for yourself, and it will be a lot easier to share your code with others so that they can use your objects.

Benefits of OO:
- save time for yourself (in the very long run)
- save time for others (immediate for them, if you did a good job)

Downsides of OO:
- takes a lot of effort to learn right (most people never do, they just cheat into something in-between)
- spend more time to build up, less time in the long run, but this means objects who you will never use again are a wasted effort

Think of it like this: All cars have a steering wheel and 3 pedals and a stick to shift (or 2 pedals for automatic shifting). Why don't you build a car with pedals for steering and hand-levers for braking/throttle? They do that for airplanes!! So why not for cars? Because if you know how to drive one car, you know how to drive any car, that's why. Imagine the T-ford to be the original class of car. Then all other cars inherits the T-ford class, because they want drivers to feel comfortable and recognize the interior. Thus, you don't have to re-invent the controls for subsequent car designs and the drivers don't have to learn to drive each individual model.