8 ms·
Perhaps this is similar to how they work in go? "var x []int; fmt.Printf(`%p %d`, x, len(x))" outputs "0x0 0" Indexing "x[0]" results in: "panic: runtime erro
by feffe 4y ago
Perhaps this is similar to how they work in go?
"var x []int; fmt.Printf(`%p %d`, x, len(x))" outputs "0x0 0"
Indexing "x[0]" results in: "panic: runtime error: index out of range [0] with length 0"
They can also be appended to and then produce a valid slice.