From: Xavier Noria Date: 2008-09-21T08:27:10+09:00 Subject: Re: for or each? You cannot rationalize a convention. Conventions happen, it is difficult to explain why things are the way they are when they are mostly stylistic. You use two spaces in Ruby because you want your code to be idiomatic. Can it be said that two spaces are obviously better than four or eight? I don't think so, it is just a convention. And when you write Perl or Java you use four. That's it. In my opinion you use #each in your Ruby code because that's what people use. That's what the book you first read use, that's what everybody writes. Your code is supposed to use #each, you learn that when you learn Ruby and probably *force a change in your mind a priori* if you come from almost any other language. Just to follow the conventions and write code that resembles what the community has converged into. You can argue that the convention has converged because iterators blah and yielding blah, but for user in users ... end is crystal clear, readable, has all the benefits of #each because it uses #each, and what not. As a counterargument, in ERb templates for-loops are not perceived as "funny" and they are commonly used.