// expected: pop is a statement: it removes the last element; read it with s[len(s)-1] // // pop removes and returns nothing usable. The old expression form returned the // element WITHOUT shrinking, so `v := pop(s)` and `pop(s)` meant two different // things depending on whether the value was used - a footgun, not a feature. // The read is `s[len(s)-1]` and the copy is `s[len(s)-1:]`; both are plain // expressions with the same empty-slice panic. package main func main() { select { case <-shutdown: return default: } s := []int32{1, 2, 3} v := pop(s) println(v) }