From: Tim Bates Date: 2003-02-19T13:50:17+09:00 Subject: Re: String#+ operatorbroken? On Wed, 19 Feb 2003 03:15 pm, Gavin Sinclair wrote: > Basically, programmers have to take some responsibility for the > methods they use. It's something of a Ruby idiom to use << for > appending, and if you want to program in Ruby, you need to learn some > Ruby idioms. > > Also consider the fact that the "+" method can be redefined. So can <<. The important thing here is that + and << can be redefined *independently* of each other, whereas += is just syntax sugar involving +, and can't be defined independently of it. Making += into syntax sugar for << instead would confuse people and is very likely to break old programs. Tim Bates -- tim@bates.id.au