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

2023-08-15 Thread Shinya Sakae
Hi Brian. Thanks for reaching out. I understand. On Monday, August 14, 2023 at 4:11:56 PM UTC+9 Brian Candler wrote: > On Friday, 11 August 2023 at 17:56:01 UTC+1 Shinya Sakae wrote: > > I often hear the term `shallow copy', but I don't know what `shallow > clone` means. &

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

2023-08-11 Thread shinya sakae
, 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 the cloned ma

[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 copy

[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

[go-nuts] Do pointer receiver methods need to be checked for nil?

2021-11-25 Thread shinya sakae
Hi. I've been using Go for a while now, and I've noticed something. Do pointer receiver methods need to be checked for nil? In the standard package, it may or may not be checked. I'd like to hear your opinions. -- You received this message because you are subscribed to the Google Groups "golang-