From: Mark Wilson Date: 2003-10-02T03:34:43+09:00 Subject: Re: Making == symmetric? On Wednesday, October 1, 2003, at 02:16 PM, Marcin 'Qrczak' Kowalczyk wrote: [snip] > This is like saying "my programming model is unable to describe the > reality accurately, so let's change the reality to make it fit the > model". > > For me this is simply a shortcoming in the traditional > single-dispatched > OO way of thinking, that it can't make the meaning of == depend on the > types of both arguments. > > I don't say that the language should enforce == to be symmetric. I say > that the language should allow to define a symmetric == with the > desired > meaning. > > [snip] I think Ruby does allow one to define a symmetric ==. As a general matter, I think a language is only required to enforce a symmetric == for objects of the same class (or values of the same type) in order to have algebraic closure. Regards, Mark