Type embedding not inheritance
oop golang
Since we don’t have classes in go, you can say struct will do a job to make objects. So how 4 principles of object-oriented programming represent in Golang? In this post, we will discuss the principle of OOP that make Golang better than others object-oriented programming language: inheritance.
A simple question, how does Golang represent inheritance principle even if it doesn’t have extends? We can easily find out the answer to this question: embedding type
Read more...