Access on an empty slice would also panic because of out of bounds. So there’s no useful distinction there.
However, nil slices work just fine when calling append on them, while writing to a nil map in any way will panic.
However, nil slices work just fine when calling append on them, while writing to a nil map in any way will panic.
No comments yet.