From: Christian Szegedy Date: 2001-05-16T02:24:02+09:00 Subject: [ruby-talk:15192] Re: operator idea Dave wrote: > Or are you suggesting that x += a should have the same semantics as > x << a? > > I have to admit I'm confused. Perhaps I am confused: I thought that the semantics of a+=x a< So are you suggesting mapping > > x = a + b + c > > into > > x = a.dup > x += b > b += c > > or > > x = a.dup > x << b > x << c I said that if the + operator would be derived from the += operator, instead of the current way, then it would be much more effective. So you would define the += operator only, which, in turn, would define the + operator automatically. Specially for string case: you could implement += exactly the same way the << is implemented now. Do I miss some something? Best Regards, Christian