2 ms·
It's perhaps subtle, but there is a real difference -- traditional inheritance allows the base class to call methods in the derived class; Go embedded fields do
by dilap 10y ago
It's perhaps subtle, but there is a real difference -- traditional inheritance allows the base class to call methods in the derived class; Go embedded fields don't have this property, which is a huge simplification. (You also don't have all the complexities of constructors.)