Re: [go-nuts] What does "shallow clone" mean?

2023-08-11 Thread shinya sakae
Many thanks! 2023年8月12日土曜日 1:14:49 UTC+9 TheDiveO: Personally, I find the source https://cs.opensource.google/go/x/exp/+/352e893a:maps/maps.go;l=65 to be helpful in quickly answering such questions. On Friday, August 11, 2023 at 4:36:50 PM UTC+2 Ian Lance Taylor wrote: On Fri, Aug 11, 2023,

[go-nuts] What does `shallow clone` mean?

2023-08-11 Thread Shinya Sakae
maps package was released with Go 1.21. Clone() comment says "This is a shallow clone". I often hear the term `shallow copy', but I don't know what `shallow clone` means. What is the state of a `shallow cloned` map? Do you mean that the cloned map values are shallow copied? > Clone returns a

Re: [go-nuts] What does "shallow clone" mean?

2023-08-11 Thread TheDiveO
Personally, I find the source https://cs.opensource.google/go/x/exp/+/352e893a:maps/maps.go;l=65 to be helpful in quickly answering such questions. On Friday, August 11, 2023 at 4:36:50 PM UTC+2 Ian Lance Taylor wrote: > On Fri, Aug 11, 2023, 7:28 AM shinya sakae wrote: > >> maps package was

Re: [go-nuts] What does "shallow clone" mean?

2023-08-11 Thread Ian Lance Taylor
On Fri, Aug 11, 2023, 7:28 AM shinya sakae wrote: > maps package was released with Go 1.21. > Clone() comment says "This is a shallow clone". > I often hear the term `shallow copy', but I don't know what `shallow > clone` means. > What is the state of a `shallow cloned` map? > Do you mean that

[go-nuts] What does "shallow clone" mean?

2023-08-11 Thread shinya sakae
maps package was released with Go 1.21. Clone() comment says "This is a shallow clone". I often hear the term `shallow copy', but I don't know what `shallow clone` means. What is the state of a `shallow cloned` map? Do you mean that the cloned map values are shallow copied? -- You received this