From: Navindra Umanee Date: 2005-07-18T01:49:20+09:00 Subject: Re: delaying string evaluation Ara.T.Howard wrote: > i generally wrap the 'beating' of data with something like Aha, but this is just the beginning. I was impressed by Amrita when I first looked at the table example, but the more complex stuff you have to do, the more contortions you have to suffer. To do an arbitrary text substitution, you have to begin using these ugly statements, for example, and to substitute attributes you have to use some other indirect stuff to describe them... but all this is easy compared to what you have to do for complex control flow and computation. Development has in fact stopped on Amrita, as far as I can tell. Now it's Amrita2 which allows you to use ERB... and you're back to square one with an uncomfortable mix of different syntaxes. Essentially I think this is a tacit admission that the Amrita approach is not powerful enough on its own, or really it is just too clunky. Then there is the horror that is Template Spec. I could have it all wrong of course, having never used Amrita. However when I start thinking about how I'm going to convert all my "just do it in Ruby" code to Amrita, I get a nice little headache. My Ruby HTML code generation does recursive tree traversals, has special conditions, it has counters keeping track of nesting levels that it uses for later substitions in the code it is building. It's complex stuff doing complex things, but I "just do it" because it really is straightforward Ruby coding. There's nothing magic about recursion or counters. On the other hand, I haven't the faintest idea how I would approach that in Amrita. I imagine I would have to do all the work on some external data structures and then somehow apply it to a template. It's just an extra indirection and extra work... for what really? A performance hit at runtime? Amrita just feels like a mental straitjacket to me. I too, like you, am attracted to the idea of separating HTML template code from Ruby code. I can't quite think of a way of doing this that is actually worthwhile when getting down to the more complex stuff. :-) Cheers, Navin.