The 2D slices example from
https://go.dev/doc/effective_go#two_dimensional_slices is confusing, isn't it?
This is the example:
// Allocate the top-level slice.
picture := make([][]uint8, YSize)
// One row per unit of y.
// Loop over the rows, allocating the slice for each row.
for i := range picture {
picture[i] = make([]uint8, XSize)
}
This implementation assumes that we access one element by (y, x) pair, which is confusing. That's because the pair is (x, y).
Am I wrong here?