From: Michael Neumann Date: 2001-12-11T21:49:56+09:00 Subject: [ruby-talk:28208] Re: The benefits of dynamic typing? Mark Hahn wrote: > > I think that most in the Ruby community have the same feelings towards > static typing. > > Recently, I lost an argument to several people in the community on this > mailing list. I was proposing that string concatenation should work with > any object. So "1" + 1 ==> "11". This is how Java works. I found it very > useful and used it constantly. I use it right now in ruby constantly (but I > have to add .to_s all over the place). > > The reason I lost the argument was that they claimed it would cause > hard-to-find bugs if someone meant: "1".to_int + 1. They claimed it was > ambiguous. To me it is obvious that "1"+1 means a string and 1+"1" means an > integer (because of message passing). What about: "1#{ 1 }" ??? Ok, it's less readable. Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de