Others have expressed similar sentiments, so I'm responding in general:
At work, our bug filing system has you rate each bug on several different axes, one of which is "severity". One option is "Missing functionality; workaround exists", and another (weightier) option is "Missing functionality, no workaround". In general, having *a* way to accomplish a task is not the same as having the 'ideal' way to accomplish a task. It's better than nothing, but it's not perfect.
Separate from the "because it's what certain people expect" factor, I consider the current method of appending strings to "_erbout" less convenient/ideal than using muscle-memory-friendly methods like #puts.
To take it to the extreme, what if ERB did not support any Kernel methods, but provided another mechanism for calling them? What if you couldn't write "myobj.foo" but instead had to write "myobj.send( :foo )" to invoke the method? The exact same functionality would still be there...you would just need to remember, when using ERB, to write your code in a different way than you do normally. My belief is that it would be a PITA. The more the code you have to write inside ERB blocks deviates from Ruby (syntax, idioms, or 'general use') the less convenient it is to use. The more ERB 'just works' right out of the box, the greater a tool it becomes to lure people to Ruby.
(I have coworkers who are considering using Ruby for code generation, based on me showing how incredibly simple it was to use.)
Obviously (and thankfully) ERB is not at this far extreme, but it is along this axis that I argue for including #puts and the like inside ERB.
I understand the theoretical argument for backwards-compatibility. Have you (dear reader) personally ever used #puts or #print inside an ERB template for debugging output that you didn't want included in the result? I know I haven't, but I accept that I'm a sample size of one. If backwards compatibility is truly an issue (and this RCR were accepted) then I suppose it would have to be something like an option to the constructor. (But bleah, I really want it to just work, without having to write "ERB.new( foo, nil, '%', nil, true )".)
If my above arguments do not sway the majority, then the feature won't be added. I could just release some sort of "require 'erb_with_puts'" library that wraps around the existing ERB. No worries. I'm just hoping to make Ruby better out of the box (IMHO) for new-adopters and old alike.
···
On Sep 10, 2005, at 8:40 AM, David A. Black wrote:
I can't think of any reason to do this other than the fact that people
who haven't learned how to use ERB expect it, and I don't consider
that a compelling reason.
--
"When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong."
- R. Buckminster Fuller