3 ms·
Go achieves inheritance through anonymous fields. Anonymous fields are multiple inheritance in all but name, Anonymous fields in Go are syntactic sugar for del
by BarkMore 15y ago
Go achieves inheritance through anonymous fields. Anonymous fields are multiple inheritance in all but name,
Anonymous fields in Go are syntactic sugar for delegation. Because anonymous fields do not create a "subtype" relationship between types, anonymous fields are inheritance.