this post was submitted on 02 Feb 2024
52 points (89.4% liked)

Programming

17398 readers
156 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

There are so many definitions of OOP out there, varying between different books, documentation and articles.

What really defines OOP?

you are viewing a single comment's thread
view the rest of the comments
[–] matcha_addict@lemy.lol 14 points 9 months ago (2 children)

OOP is one of, if not the most popular programming paradigm. Surely understanding it at a theoretical level isn't useless. It would be the first step to understanding its benefits and trade offs.

[–] polygon6121@lemmy.world -2 points 9 months ago* (last edited 9 months ago) (1 children)

Use it for a while, to complement your theoretical study. Things will only become clearer when you have your own understanding and opinion about it.

[–] ALostInquirer@lemm.ee 7 points 9 months ago (1 children)

How would one use it if they're struggling to understand it to start with? 🤨

[–] polygon6121@lemmy.world 0 points 9 months ago (1 children)

You are right. But I still find the 'heavier' theory, that is what I assumed OP refered to, to be more difficult to grasp then following a basic tutorial and just trying to solve problems. In time with practice you get a better understanding for WHY the theory is how it is, and you can apply it better and of course improve your code. And that understanding will unlock more tools both in OOP and in your mind.

So if you are struggling, I recommend not starting with theory.

[–] ALostInquirer@lemm.ee 1 points 9 months ago* (last edited 9 months ago) (1 children)

I see where you're coming from, I think. In my experiences with trying to follow tutorials though, I've found the difficulty to be between rough explanations and the examples given feeling a little too simple and isolated from how they might be applied in a working program.

[–] polygon6121@lemmy.world 2 points 9 months ago

Yes, and often incomplete or not maintained.

Anyway, OP read different sources about OOP and still needs to ask the definition... At some point it is better to just do something than to keep banging your head at the theory. If learning to code is your endgoal

[–] bizdelnick@lemmy.ml -4 points 9 months ago

Theoretical level is useless, believe me. What is useful is understanding at intuitive level. You can achieve it with or without knowing theory, but you need a lot of practice anyway. Also, different languages providing OOP actually encourage different approaches. You have to follow one that your PL is suited to and that is the best solution for your current task, not that OOP or any other paradigm dictates you.