From: Austin Ziegler Date: 2002-09-11T03:11:10+09:00 Subject: Re: Larry Wall's comments on Ruby On Tue, 10 Sep 2002 23:31:40 +0900, 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. > 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. Ummm... with a string, a + b != b + a; yet this is to be expected. I did a quick Google on "non-commutative addition" and came up with http://www.cut-the-knot.com/do_you_know/addition.shtml This says that addition is *often* required to be commutative, but not always. -austin -- Austin Ziegler, austin@halostatue.ca on 2002.09.10 at 14.02.11