From: Giuseppe Bilotta Date: 2002-09-11T01:14:23+09:00 Subject: Re: Larry Wall's comments on Ruby nico wrote: > On September 10, 2002 04:38 am, Gavin Sinclair wrote: > > > I'm not convinced that it's unnatural. We don't know the types of a and > > b, and for some objects a and b, a + b != b + a. > > > > I'm interested what you think the alternative is, or an argument against > > the above, and how you would like to see a + b defined in Ruby. > > > > Gavin > > I find that highly unnatural because we've been learning since grade school > that a + b = b + a. > > If the objects don't satisfy that property they should be using a different > symbol. No way. For example, product is commutative only up to complex numbers. If you move on to quaternions, you get a noncommutative product. And as for noncommutative sum ... think for example about strings. "a" + "b" != "b" + "a" -- Giuseppe "Oblomov" Bilotta "E la storia dell'umanit�, babbo?" "Ma niente: prima si fanno delle cazzate, poi si studia che cazzate si sono fatte" (Altan) ("And what about the history of the human race, dad?" "Oh, nothing special: first they make some foolish things, then you study which foolish things have been made")