4 ms·
Based on Ansible and other systems going all the way back to GNU make, I believe that the programming language version wins every time. We're programmers, and
by rkangel 8y ago
Based on Ansible and other systems going all the way back to GNU make, I believe that the programming language version wins every time.
We're programmers, and sometimes we're going to need to program to solve this problem. Taking away that option is always a pain. Even if what you wanted was possible with Jinja2, it wasn't necessarily very readable anyway.
Proponents of it will point at that this is the sort of thing that Lisp is good (and they'd be right), but there are other functional languages that are good at it too - the simpler syntax is a bit of a headstart. Elixir's macros system enables a number of lovely little DSLs (e.g. Phoenix router or Ecto DB schemas).