...

/

The Object Orientation in Go

The Object Orientation in Go

This lesson summarizes how object orientation is handled by Go and upto which extent object orientation can be handled by Go.

Summary on object orientation

Let us summarize what we have seen about object orientation in Golang so far: Go has no classes, but instead, it has loosely coupled types and their methods to implement interfaces. The three important aspects of OO-languages are encapsulation, inheritance, and polymorphism. How are they realized in Go?

  • Encapsulation (data hiding): in contrast to other OO languages where there are four or more access-levels, Go simplifies this to only
...