I can only guess, but I think it's because of the desire for a type to be "equationally complete", meaning you can distinguish any value (even these kind of singular "valueless values") through the public interface. This means you can write operator== as a free, non-friend function.
The term "equationally complete" seems to come from Alex Stepanov (see p. 20 of his Notes on Programming) and is closely related to the notion of a "regular" type.
View all comments
Show parent comment
3
u/jiixyj Aug 14 '26
I can only guess, but I think it's because of the desire for a type to be "equationally complete", meaning you can distinguish any value (even these kind of singular "valueless values") through the public interface. This means you can write
operator==as a free, non-friend function.The term "equationally complete" seems to come from Alex Stepanov (see p. 20 of his Notes on Programming) and is closely related to the notion of a "regular" type.