From: Devin Mullins Date: 2005-09-11T05:18:04+09:00 Subject: Re: RCR to modify #puts and #print inside ERB Gavin Kistner wrote: > Thanks. #1 seems like a good example. #2 seems a little too contrived - your example obviously doesn't need erb - and I would imagine that the addition of markup would make the erb syntax a little less ugly. That said, I don't feel like trying to make a counter-example, so take that with a grain of salt. > That's a good point. I suppose it seems 'correct' to me because (for > me) it's DWIM. As for for debug messages, I argue that debug messages > should be done with #warn anyhow (which would remain unchanged) as > STDERR is more appropriate (I think) than STDOUT. And, I simply > didn't believe that anyone was actually using the puts-in-erb-for- > debug functionality. (And I suppose I still won't, until someone says > "Yes, I use that!") I should mention, I don't really use erb, so I'd abstain from the vote. I just piped up to provide a little analysis. I'm starting a Rails project (finally), so maybe I'll have some better opinions in a couple weeks. :) > So it currently meshes well for people coming from JSP, eh? That's > good to know. Yeah. (Well, % at the beginning of a line is new.) I don't know what that's worth, though. All the Manly Men of the Java web world would never run into the problem, because 1. they wouldn't place logging code inside JSP (ideally no logic at all, using custom tags where logic would be needed), 2. they'd be using log4j, and 3. they'd never use out.println, if only for the sake of purity. > Thanks for the article. I love reading Joel :) Mmm... controversy... Devin