From: Sammy Larbi Date: 2006-10-03T00:36:11+09:00 Subject: Re: Why can't Ruby automatically cast variables? Joe Ruby MUDCRAP-CE wrote: >One thing that annoys me about Ruby is that casting variables is >required: > >i = 5 >a = 'logan' > >puts a + i.to_s > >Or > >a='2' >b=3 > >puts a.to_i + b > >Why can't (or can?) Ruby just handle 'puts a + i' or 'puts a+b'? > > > How would it know whether you wanted to concatenate the two, or add them?