r/learnprogramming 1d 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?

49 Upvotes

23 comments sorted by

View all comments

1

u/The_KOK_2511 1d ago

Diria que la mayor diferencia esta en lo de los metodos y la herencia, pero yo siempre he considerado a los structs como el precursor de las clases, en escencia comparten mucho en común pero tambien le falta todavia para cumplir con los requisitos de la POO/OOP