On 5/29/07, Giles Bowkett <[EMAIL PROTECTED]> wrote: > > > True; but encouraging programmers new to Ruby to write their code as > if it were PHP isn't going to result in beautiful code. The risk > you're taking there is of a glut, in a few years' time, of ugly Rails > code based on PHP programmers building by guesswork. There's already a > ton of it out there, and as the momentum keeps building, there will > only be more.
Dude, get a hold of what you're saying! It's just a syntactic variant, but it's still enumerating >.< I mean the word > "each" is a relatively intuitive word, and people who are > **completely** new to programming often find it **more** intuitive > than a for loop. So you're saying that @posts.each do |post| ... is more intuitive than for post in @posts The latter not only reads better, but is easier to type. Using the former forces the designer to know about blocks and their arguments! Seriously. I once taught some college girls Java. They couldn't wrap > their heads around it. The irony is that a year before they had done > Scheme and had no trouble with it at all. Recursion and lists are much > more intuitive to the complete novice, because the ideas are more > elegant. For loops are pretty weird to people who aren't used to them. You sure you taught those people well? Because I'd like to see a college girl getting fancy with recursions while still not understanding a simple for loop. Man, you need to loosen up - just because we use a language that supports iterators doesn't mean we're the best and that every other will eventually crumble under the ugliness of its loops! > Personally, I never use the for style enumerators, but I don't use > > scaffolding for anything except throwaway code either. YMMV. > > No, of course my mileage doesn't vary. What kind of moron would I have > to be for my mileage to vary from that? Thanks a lot. Jesus. Now you've just called the rest of the community (which uses for loops and scaffold generators) morons. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core?hl=en -~----------~----~----~----~------~----~------~--~---
