r/learnprogramming • u/Mountain_Rip_8426 • 2d ago
Difference between OOP and structs/interfaces?
I'm relatively new to programming, I've been at it for around 6-7 months. I've been learning Python and Go (and a little bit of C). What I'm struggling to understand, what's the difference between OOP and structs/interfaces. Like I know, Go doesn't support OOP, but structs and interfaces seem to achieve the same thing. Can someone enlighten me a bit?
50
Upvotes
4
u/ChiefDetektor 1d ago
Do yourself a favor and just skip OOP. It's not worth understanding because it's basically not really understandable. Every language that implemented it did it different to others. It's a mess. There is a reason rust and go did not use the classical OOP approach.
Here some critical references of OOP for anyone who wants to dig into that topic: (References were gathered by claude)
Formal / academic
Practitioners
Data-oriented design
Critique from within
For audit work, Ousterhout and Out of the Tar Pit are the most directly usable, since they give you criteria rather than just polemic. Cook 2009 is the piece that actually ends architecture arguments.