From: James Edward Gray II Date: 2005-07-17T05:38:43+09:00 Subject: Re: delaying string evaluation On Jul 16, 2005, at 3:23 PM, Navindra Umanee wrote: > James Edward Gray II wrote: > >> Are you aware that Ruby ships with a templating language in its >> standard library? >> > > Yes I know of ERB. I am not sure what the advantage of using a > different syntax is, when I can simply use the same Ruby syntax but > escape it when necessary. > > <%= delay %> is at least as verbose as \#{delay}. > > What advantage do you see to using a new syntax instead of just Ruby? Off the top of my head: * ERb's <% ... %> flow control construct. * The ability to control spacing as you can with the special string ERb's constructor takes. * ERb's handy "% ... entire line of code ..." shortcut. * ERb's utility methods for HTML and URL escaping. But if you've found what works for you, far be it from me to complain. I was just making sure you were aware of another option. James Edward Gray II