News for hackers. Stuff that matters.
Re:Go Is a Shop-Built Jig by sat on Thursday September 18, 2014 @03:14PM (#8337046)
Embedding won't give you a flattened structure with transparency you expect. In other words struct B embedded in struct A will only create a syntactic sugar so that you can access properties of B through A. It won't work in other cases .Check this out - http://stackoverflow.com/questions/24333494/golang-reflectio...

This is not to say inheritance is better. I am just illustrating how reuse is harder with go because it expects a lot more code to do a simple thing.

There are no comments on this comment yet.