On Wed, May 4, 2022 at 12:15 AM Will Faught <will.fau...@gmail.com> wrote:
> 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. I think we are on the same page. This thread is about comparisons on the language level, not about some library functions. Thus we can ignore reflect.DeepEqual and focus on the equality operator only. That makes things simpler. Now, what I wanted to point out is that the equality operator, as defined in Go, always compares the values of its operands. It's a simple and easy to remember rule. It could have been defined in a different way, sure. Anyway, it was not and talking about deep vs shallow comparison of the Go equality operator does not make the discussion any clearer - because it does not, in our case, apply. -- 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-VnGvnsuohiFVkLZ9JsB6ZyD-NNuGd8BDj5_haM_O7G7Q%40mail.gmail.com.