From: jonty Date: 2009-03-27T07:47:21+09:00 Subject: Re: tagz-5.0.0 I have been using haml out of necessity recently (sinatra), erb is too much like hard work. I find that haml is deeply frustrating as getting the whitespace right to nest things properly is, quite frankly, a pain. Markaby used the right sort of syntax I think and therefore I am mightily intrigued by Tagz. Is it fast?? Thankyou Ara - I will try it our tomorrow. Brian Candler wrote: > Ara Howard wrote: > >> you mean combining erb with the dsl i assume? >> > > At a lower level, the use of hashes to represent attributes is > strikingly similar. e.g. > > a_(:href => "/foo"){ "bar" } > > compared to HAML: > > %a{:href => "/foo"} bar > or > %a{:href => "/foo"}= "bar" > > HAML lets you put any Ruby expression inside %a{...} which returns a > hash. Of course, tagz is real Ruby code, whereas HAML is its own > language. > > The other thing which struck me was your use of nesting to build tables. > HAML really excels here, and the indentation-driven syntax means you > don't have to balance the closing parts. Somehow I find this more > natural for web page templates than for code. > > >> i've used this >> >> def unindent! s >> > > Yes, that's the sort of thing I was thinking of. HAML like this would > still need to go via a compilation phase each time it is executed, > whereas tagz is just run. Hence the benefit to keeping HAML snippets > separate and cached. > > Regards, > > Brian. > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.0.238 / Virus Database: 270.11.26/2020 - Release Date: 03/24/09 09:19:00 > >