On Friday, 7 October 2016 at 12:04:09 UTC, Mark wrote:
"If opEquals is not specified, the compiler provides a default version that does member-wise comparison"
That's referring to structs. For classes, it gives an identity comparison function here: https://dlang.org/spec/operatoroverloading.html#equals
Wouldn't member-wise comparison be a more intuitive default?
Classes are supposed to represent encapsulated objects where you don't look at the members from the outside, so that might be surprising in a different way.