From: Robert Klemme Date: 2010-02-20T06:15:06+09:00 Subject: Re: strings combine On 19.02.2010 21:24, Justin Collins wrote: > Raul Jara wrote: >> Roger Pack wrote: >> >>>> I think you misunderstand what I was saying. I was not asking what the >>>> differences between the parser and the runtime are. I was asking for a >>>> rationale. If Matz believed that strings, when placed together without >>>> any punctuation between them should be concatenated, why didn't he make >>>> it standard operating behavior? I can't imagine it would have been so >>>> difficult for when the parser sees two variables in a row to treat it as >>>> equivalent to a concatenation call on the first variable with the second >>>> variable as an argument. If Matz didn't think that two strings should >>>> be concatenated, why program that behavior into the parser? >>>> >>> Yeah it ends up being pretty hard to generate a parser that will do >>> both. >>> -rp >>> >> >> I'm not sure why, though. The parser is able to turn >> >> x + y >> >> into >> >> x.+(y) >> >> >> What would be so hard about having the parser turn: >> >> x y >> >> into >> >> x.+(y) >> >> ? >> >> Or if you only think strings should work that way, and not numbers: >> >> x.concat(y) >> > > Because > > x y > > already means > > x(y) Exactly my point. robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/