On Wed, Oct 1, 2008 at 2:15 PM, Jim Freeze <jimfreeze / gmail.com> 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.

Interesting.

> So, when you see
>
>  x = "foo" + "bar"
>
> do you think of the '+' as a given for a string concatenation operator or as:
>
> x = "foo".+("bar")
>
> where, someone could have changed String#+.

IMO, this is a feature, not a bug.

If we really need a 'safe' alternative for String#+, we could have
something like __concat,
but I'm not seeing the cause for concern.

Also, there isn't a workaround for any other objects that use + (such
as Numeric, AFAIK)

-- 
Technical Blaag at: http://blog.majesticseacreature.com | Non-tech
stuff at: http://metametta.blogspot.com