3 ms·
> Items in lists must be objects with fields because it is always decomposed, and there is no way to get a handle on the list item itself. {{%IMPLICIT-ITER
by grayrest 15y ago
> Items in lists must be objects with fields because it is always decomposed, and there is no way to get a handle on the list item itself.
{{%IMPLICIT-ITERATOR}}
{{#foo}}
{{.}}
{{/foo}}
But...Handlebars.
- benatkin 15y agoYes, Handlebars. I much prefer {{this}} to {{.}}, which at first glance looks a bit like a Perl 6 or Haskell operator rather than a dot surrounded by tags.
- chrisvest 15y agoI did not know about the {{.}} construct when I wrote that article, but have since been told about it a couple of times. It is indeed a useful thing that would have resolved one of the issues I wrote about. However, it is not in the Mustache spec, nor is it implemented in the particular Mustache implementation, Pystache, that I happen to be using. It could be that Pystache is just behind the curve. I don't know. I have also since found out about Handlebars.js. It looks nice. If Mustache is the 80% solution then Handlebars.js is probably the 99% solution or something like that. Except I would need an implementation in Python, and I haven't come across one.