DEV Community

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

Collapse
 
equiman profile image
Camilo Martinez • Edited

OOP, until know that exist something called Design Patterns and Uncle Bob's clean code.

I'm steel fighting with University 'knowledge' learn years ago vs all this 'new' patterns.

Sure I have better understanding of OOP, but feel I'm not already thinking on POO naturally as Design Patterns say.

Collapse
 
rhymes profile image
rhymes

What's POO?

Collapse
 
equiman profile image
Camilo Martinez

Sorry, my mistake. I had written in Spanish, is OOP (Object Oriented Programming)

Thread Thread
 
rhymes profile image
rhymes

ahah don't worry. This other answer of mine might help:

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.

But if you have questions, ask them :)