News for hackers. Stuff that matters.
Re:Having fun with Go's nil, interfaces and errors by slrz on Sunday September 18, 2016 @08:28AM (#12525014)
Interface comparisons check both, the value and the dynamic type. Describing that as "comparing vtables" is misleading.

It the types don't match, the operands are not considered equal. Type and value have to match for two interface values to be equal. How does that not make sense?

For mismatched dynamic types you can't meaningfully compare the values in the general case, so of course you need to consider types.

Re:Having fun with Go's nil, interfaces and errors by pcwalton on Sunday September 18, 2016 @12:39PM (#12525926)
> Type and value have to match for two interface values to be equal. How does that not make sense?

Because people expect == to compare values, not types. Nobody has ever questioned this behavior in Java and C#.