I'm not sure we're on the same page in terminology. I meant shallow as opposed to deep. E.g. pointer equality in terms of `==` vs. `reflect.DeepEqual`. Unequal pointers can reference values that are equivalent.
On Mon, May 2, 2022 at 11:58 PM Jan Mercl <0xj...@gmail.com> wrote: > On Tue, May 3, 2022 at 8:32 AM Will Faught <will.fau...@gmail.com> wrote: > > > Just as pointer comparisons are shallow, so too are comparisons for > types that contain pointers. > > Pointer comparisons are not shallow. Comparing two pointers compares > the entire values. a == b and *a == *b compare different values but in > both cases, and always, the entire values. (What concerns the > semantics of the Go '==' operator, equality per se can be defined in > many other ways.) > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAKbcuKhtQp1iSPP8BDYa3Zguw4rCgGTd6nCcV%3DTRK6%3DBunF3fg%40mail.gmail.com.