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/CAA40n-VkT9FZz4P7A6e-iscYzhEGN20kXnxZhsNHuwv6pzEt3Q%40mail.gmail.com.

Reply via email to