Pale Horse wrote: [...] >> I do likewise. To tell you the truth, I don't even remember that the >> for construct exists until I see it in other people's code. > > Indeed, and old code at that in my case. I remember it from when briefly > I looked into C.
The for loop in C is like the for loop in BASIC, not the for...in loop in Ruby. Ruby's for...in is like the for...in (or foreach) in Perl, PHP, or recent versions of Java. Despite the use of the same keyword, they're two very different constructs. > >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> [email protected] > > I'm interested to get people's input on this. Some Rails programmers > still persist on using FOR. Understandable if they have extensive > programming background including Ruby. ...which I do. But for...in just doesn't feel like a good fit for Ruby to me -- it feels more like syntactic sugar for Perl and PHP programmers. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

