Why Go is a poorly designed language (from a perspective of Go lover) (medium.com) 13 points by tucnak 10y ago ↗ HN
[–] flippant 10y ago ↗ There has to be a better way of doing this: numbers = append(numbers[:2], append([]int{3}, numbers[2:]...)...) [–] tucnak 10y ago ↗ I am afraid there isn't. In fact, it's called a "slice trick" and listed in Go wiki: https://github.com/golang/go/wiki/SliceTricks
[–] tucnak 10y ago ↗ I am afraid there isn't. In fact, it's called a "slice trick" and listed in Go wiki: https://github.com/golang/go/wiki/SliceTricks
3 comments
[ 3.1 ms ] story [ 36.3 ms ] thread