3 ms·
Channels, maps, and arrays are generic in Go. They solve a lot if key problems. The problem is that you can't create your own generic structure. Try building a
by nine_k 9y ago
Channels, maps, and arrays are generic in Go. They solve a lot if key problems.
The problem is that you can't create your own generic structure. Try building a statically type-safe red-black tree, or something like that, without copy-pastig the implementation for each new node data type.
Higher-order functions are also basically impossible.
- masklinn 9y ago> Channels, maps, and arrays are generic in Go. Pointers and slices as well, and of course the various builtin operators or functions used to work on them (make, range, len, close, …).