4 ms·
Go has interface{}, which can be abused as much as generics for the same purpose, but without the type safety, hence, less secure. And nobody is advocating C++
by latronic_notron 8y ago
Go has interface{}, which can be abused as much as generics for the same purpose, but without the type safety, hence, less secure.
And nobody is advocating C++ style template metaprogramming. There are much better implementations of generics, as acknowledged by Russ Cox himself.
- throwaway415415 8y agoUsually interface{} is abused by java programmers. I agree that it's not great, but if you don't come from java or c++ chances you won't follow these patterns at least.