Saturday, November 28, 2015

Understanding Multiple Inheritance in Go

There are plenty of blog posts describing how interfaces and embedding work with Go but not a lot of them show you how this solves the multiple inheritance problem.

I figured I might create a little snippet on the Go playground for you to play with and understand how multiple inheritance is solved in Go:

I guess you could summarize Go's behavior during multiple inheritance as respect the obvious and explicit is better than implicit.

No comments:

Post a Comment