by davidw · 19y ago · 0 comments
The white space issue doesn't really matter. Except for a few specialized areas like template creation, where Python is just not a natural fit.
That's one of the things I like about Rails - Ruby may not be the absolute perfect language for scripting web templates (maybe Tcl is?:-) but it's good enough, and it's useful without some of the weird hacks that the Python guys use to do templates.
% for row in rows:
* Here is a row: ${row}
% endfor
http://www.makotemplates.org/That's kind of 'hackish', but not bad at all if you ask me.
Compared to an ERB snippet it is about the same (though you'd probably use each and a block here in Ruby.
<% for row in row %>
* <%= row %>
<% end %>