DEV Community

Discussion on: Is Go an Object Oriented language?

Collapse
 
rhymes profile image
rhymes • Edited

I feel like OOP is more of a pattern/paradigm than a constraint. Some languages have constrained themselves to that single pattern but many (probably Go falls in this category) can be used as OOP, even if they are not constrained to it by design.

An example: the basics of OOP in Python and Ruby are implemented in the C layer. Is C a OOP language? Not really, but you can still use it that way.

Thread Thread
 
web3coach profile image
Lukas Lukac • Edited

Sure, fair point and it surely is not black/white binary answer. That's why the official Go doc states: "kind of". The question is, should you? ;) The only way to use Go as OO language is by abusing pointers for everything and that doesn't make too much sense to me.

Thread Thread
 
rhymes profile image
rhymes • Edited

ahhaha "should you" is another relative question :D

Thread Thread
 
web3coach profile image
Lukas Lukac

unfortunately :D damn IT.