On Oct 1, 2008, at 1:15 PM, Jim Freeze wrote:

> On Wed, Oct 1, 2008 at 1:08 PM, Gregory Brown <gregory.t.brown / gmail.com 
> > wrote:
>> On Wed, Oct 1, 2008 at 1:58 PM, James Gray  
>> <james / grayproductions.net> wrote:
>>> I'm disappointed that Ruby still supports this goofy syntax:
>>>
>>> $ ruby_dev -ve 'p "a" "bc"'
>>> ruby 1.9.0 (2008-09-27 revision 0) [i386-darwin9.5.0]
>>> "abc"
>
> I think one reason it was originally implemented is because the '+'
> operator could potentially be overridden and there needed to be a way
> to concat strings.

It's interesting to hear the reasoning, but I'm not buying it.  :)

Most of Ruby is vulnerable to this issue and we don't seem to need  
weird syntaxes for all of those cases.  Right?

Other ways to concatenate Ruby Strings:

   "#{'a'}#{'bc'}"  # cannot be overridden

   'a'.dup.concat('bc')

   'a'.dup << 'bc'

   'a'.sub(/\z/, 'bc')

I'm not arguing that these are great strategies of course.  I just  
think we can manage to get by without it.  :)

James Edward Gray II