Q:

Semantic Meaning of a tuple not equal to zero

val tuple = (1,2)  //> tuple  : (Int, Int) = (1,2)
tuple !=0          //> res0: Boolean = true

val tuple1 = (0,0) //> tuple1  : (Int, Int) = (0,0)
tuple1 !=0         //> res1: Boolean = true

I thought the above should not compile.. but it does. If so, what does this mean? In what context, does comparing a tuple to zero make sense?
Also, As you can see tuple which is non-zero gives true when compared to zero.

A:

You can compare any object with any other. If they are of different types (as a tuple and the integer zero will always be), they will always be unequal. You can use scalaz' =/= and === if you want to require that the compared objects are the same type at compile time.

