Some confussion on Slice

Hi , Am a beginner in go. when i use to know about Slice its quite interesting.
Actually , Slice is dynamic and will have references to its original array. but what if we declare an empty slice. what will they reference to ? . Am wondering on that , if anyone knows it . please share your answer.

A nil slice will not reference any array; its underlying pointer will be nil. If you make a zero-sized slice, it is implementation defined what will happen. The current Go compiler will point the underlying array to a shared 0-size memory location.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.