Next: Templating for Rubyists, Previous: Templating, Up: Layouts and Rendering in GNU Artanis [Contents]
If you’re familiar with Django, which implemented a DSL(Domain Specific Language) to express presentation rather than program logic. Templating in GNU Artanis follows a different philosophy.
Templating in GNU Artanis, is just writing Scheme code in the HTML document. Why? Because of the philosophy of FP(Functional Programming), everything is a function. So,
(filesizeformat size) is easy enough to grasp for anyone with scheme experience. It’s just a simple function calling in prefix-notation. There’s no need to implement DSL like
size|filesizeformat to increase the complexity of code. Let alone the syntax is very different from Python.
size | filesizeformat follows postfix-notation, used in stack-based languages, say Forth. Such a language used to delegate another programming paradigm named concatenative programming. It’s very different from the paradigm of Scheme (functional programming), and the paradigm of Python (imperative programming).
The philosophy of GNU Artanis templating is to bring it into correspondence with the paradigm of the language. And reduce unnecessary complexities. KISS.