3 ms·
But you still have to write the function a hundred times — once each for every immutable map you'll use. This is the opposite of DRY.
by kuschku 9y ago
But you still have to write the function a hundred times — once each for every immutable map you'll use.
This is the opposite of DRY.
- 43224gg252 9y agoGo also supports libraries.
- kuschku 9y agoGo doesn’t really support libraries of data structures and containers, though. You can’t build a library of different kinds of immutable and mutable maps, trees, etc that are reusable – precisely because generics are missing.
- _ph_ 9y agoYes, if you needs lots of different immutable maps as your interface to a library, then the lack of generics is annoying. But the question is, is the immutable map such a common interface, or should your library and abstraction barrier be something else? I am a professional programmer and have prefer abstractions via objects/functions.