Hi, I have a change I want to submit, just want to check that it's
relevant first.

Is scaffolding continuing as normal?

When I see posts about getting rid of dynamic scaffolding, does that
refer to scaffolding .erb templates, or to the scaffold controller
method?

The scaffolding templates all use

<% for x in y %>

instead of

<% x.each do |y| %>

Total subtle psychological difference, but with Rails having such
incredible success, a little thing like that will encourage a lot of
new Ruby programmers to use iterators instead of explicit iteration.
For many programmers this is a big change:

http://technotales.wordpress.com/2007/04/14/explicit-iteration-considered-harmful/

When I started programming in Ruby, another programmer criticized my
code. He was real subtle about it. Any time I wrote a for loop, he
told me he'd never used one in Ruby. I was like, sure, that's great,
have you ever used scaffolding? He was encouraging me in good habits,
and scaffolding was my excuse for keeping up bad habits.

The code generated by the scaffolding templates is the first
introduction to Ruby for many people. Using iterators in the
scaffolding is kind of like putting out a welcome mat, and encouraging
people to leave their bad habits at the door.

--
Giles Bowkett

http://gilesbowkett.blogspot.com
http://gilesgoatboy.org


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to