max(x::T, y::T) and min must be commutative!

Changing the definitions of min and max to use isless seems reasonable, although for non-floating-point types < and isless should be identical, so arguably the real bug here is that they differ for sets. The fact that < and <= are defined for sets is quite old and probably not a great idea – we have and operators that can be used for that. Defining min and max to compute intersection and union has a certain appeal, but I don’t think it’s what people would really expect, and as noted would be inefficient. It seems more appropriate to introduce generic meet and join operations.

2 Likes