3 ms·
If you can avoid interface{} you should, ie. by declaring interfaces to types and using them explicitly. You can then mix your own types, and still be protected
by loopz 5y ago
If you can avoid interface{} you should, ie. by declaring interfaces to types and using them explicitly. You can then mix your own types, and still be protected by the type system.
- takeda 5y agoYes, but that requires generics and without them code generators (and if you don't use them, a lot of copy & paste).