loading...

Discussion on: Python Idioms in Go

Collapse
delta456 profile image
Swastik Baranwal

I think you should also state that Python is OOP and Go is not.

Great comparison though!

Collapse
jonatasbaldin profile image
Jonatas Baldin Author

It's OOP-ish, right? They just picked up a flavor of OOP:

  • Structs are like classes
  • Structs methods are like classes methods
  • Encapsulation is done through lower/upper case methods
  • Inheritance was not picked, but you can do composition

So, I'd say it's a kinda of OOP, just with less complexity.

What do you think?

Collapse
delta456 profile image
Swastik Baranwal

Visit this for more info.

I think that Go is based on OOPs. So technically yeah.

Thread Thread
jonatasbaldin profile image
Jonatas Baldin Author

Yeah, this FAQ helps, thanks :)