3 ms·
If I had to point at one thing Go did exactly right, I'd choose the "OOP" bit. Inheritance is an anti-pattern. Interfaces is the way to go. Maybe the only thin
by nine_k 9y ago
If I had to point at one thing Go did exactly right, I'd choose the "OOP" bit. Inheritance is an anti-pattern. Interfaces is the way to go.
Maybe the only thing I'd add is a compiler warning when an object which does not declare itself as interface X but complies to it is used as interface X. (Typeclasses would be even better, but it opens the can of worms which is the support of generics.)