I think Gavin is right… we don’t “add” strings, we concatenate them.
Using the + operator to mean “concatenate” violates our eighth grade
algebra sensibilities. It’s, um, surprising.
Note that the often-awkward Perl uses . as a string concatenation
operator, not +. This is one of the things Perl got right and Ruby got
09/10/02 09:35 AM
Please respond to ruby-talk
To: firstname.lastname@example.org (ruby-talk ML)
Subject: Re: Larry Wall’s comments on Ruby
On Tue, 10 Sep 2002, 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
b, and for some objects a and b, a + b != b + a.
I’m interested what you think the alternative is, or an argument
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
that a + b = b + a.
If the objects don’t satisfy that property they should be using a
On the other hand, in grade school you probably weren’t adding
David Alan Black | Register for RubyConf 2002!
home: email@example.com | November 1-3
work: firstname.lastname@example.org | Seattle, WA, USA
Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com