Hi folks,
I think lift's templates and snippets are a brilliantly general solution to a problem which seems to breed ad-hoc, specific solutions. Plus, I have a weakness for simple computing systems and a curious nature. It has been remarked already (
https://groups.google.com/forum/#!msg/liftweb/sWPC9SE23e8/A1gf8d6jYoIJ) that snippets in lift are lisp-like and that one can think of them as functions. However, I wanted to see if one can show that _just the built-in snippets_ and lift's tempting are enough for general computation.
I know this is a fool's errand, but curiosity got the better of me. It turns out that lift's tempting and built-in snippets are not enough for general computation, but that you only need to reconsider the notation to get turing-complete templates using just the embed snippet!
I have written up what I learned in a blog post and put an example implementation on bitbucket
http://mattr.net.au/articles/turing_templates/
This highlights one of the things I love about lift, the solutions in lift to the problems of web application development tend to be simple and powerful. This example shows off just how powerful the tempting mechanism is.
Thanks,
Matt