DEV Community

Discussion on: What dev topic do you think you should understand, but don't?

Collapse
 
rhymes profile image
rhymes

Maybe your brain was made for functional programming :)

I remember that one of the inventors of OOP regretted the name, and said that he should have called it "object message passing" or something like that.

OOP at its core is that, sending messages to objects so they can perform actions on their state.

Inheritance is a way for a family of objects to share some of that behavior (and/or some of that state). There's not a single way to implement inheritance of behavior/state.

Encapsulation is a way to hide away some of that state from prying eyes. Not all languages effectively have encapsulation.

I would say the tenent of OOP is really what the author said: sending messages to objects so that they can act.