just to clarify

when you "embed" a struct in another struct in golang, pointer or directly, the methods associated with the type also become accessible from the type that has the new embedding

additionally, code that accessed those same fields that now are part of the embedded struct, have no change in syntax unless there is a conflict with another field name (which basically can't happen)

so the process of popping out a subset of a struct into a new struct is absurdly simple and smooth in #golang

no other language makes this as easy

Reply to this note

Please Login to reply.

Discussion

No replies yet.