3 ms·
This guy needs to take a hard look at interfaces. Go didn't abandon generics, they just told everyone that interfaces are a better solution. You can write your
by yanatan16 13y ago
This guy needs to take a hard look at interfaces. Go didn't abandon generics, they just told everyone that interfaces are a better solution. You can write your code once as long as its formulated for interfaces.
As for sets, why not use a custom data structure like a balanced binary tree (such as a red-black tree)?
- xordon 13y agoBitSets have efficient set operations, eg: set intersection => bitwise AND, etc. see also: https://github.com/kisielk/bigset/blob/master/bigset.go https://github.com/kisielk/bigset/blob/master/bigset.go