3 ms·
I'm currently going through an algorithms textbook and find that algorithms and generics go hand in hand in writing generic, type safe reusable algorithms in yo
by djhworld 14y ago
I'm currently going through an algorithms textbook and find that algorithms and generics go hand in hand in writing generic, type safe reusable algorithms in your code.
Having to rewrite the same code over and over again to support one algorithm is a real pain in the butt.
...and the interface{} thing is just a workaround that defers type errors until runtime. Which in turn defeats the point of enjoying a type safe language