Why Go is a poorly designed language (from a perspective of Go lover) (medium.com) 13 points by tucnak 11y ago ↗ HN
[–] flippant 11y ago ↗ There has to be a better way of doing this: numbers = append(numbers[:2], append([]int{3}, numbers[2:]...)...) [–] tucnak 11y 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 11y 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
[ 4.5 ms ] story [ 13.0 ms ] thread