12 ms·
OMG, seriously? Because people couldn't implement smart data structures before generics were invented? (disclaimer: i think that lack of generics in Go is a m
by meshko 11y ago
OMG, seriously? Because people couldn't implement smart data structures before generics were invented?
(disclaimer: i think that lack of generics in Go is a mistake)
- pjmlp 11y agoWe could, but we got clever adopted the ideas of CLU, Ada, Eiffel and ML and stop doing that in the early 2000's. Go generate, for example, brings me back memories of a time C++ compilers used pre-processor magic for generic programming, around 1994 or so. Something like #define Type1 my nice type1 definition #include <generic-list.h> #undef Type1 #define Type1 my nice type2 definition #include <generic-list.h> ListType1 ... ListType2 ...