3 ms·
Most template languages for Lua generate functions, that will be called with their own environment. Having first-class environments makes that the "obvious" way
by shakna 5y ago
Most template languages for Lua generate functions, that will be called with their own environment. Having first-class environments makes that the "obvious" way of doing things.
For example, here's a 160LOC one I wrote a while back. [0]
[0] https://git.sr.ht/~shakna/lserver/tree/master/item/template.lua https://git.sr.ht/~shakna/lserver/tree/master/item/template....