4 ms·
A lot of these problems are mitigated by just keeping it simple. You don't, for example, need to design the templating language. Use an existing, successful lan
by iamsohungry 11y ago
A lot of these problems are mitigated by just keeping it simple. You don't, for example, need to design the templating language. Use an existing, successful language, and invert how it parses strings, and add a nicety for expressions. You can probably even reuse most of the parser, and then output code that runs by the language's eval. This gives you all of the language's constructs nearly for free. Python/Ruby/Lua/Elixir/Julia would be great for this. This also produces a better result: I can't tell you how maddening it is to not have basic language constructs in, say, Django templates, because the template designer decided to write a whole second much crappier language inside the language you're using. And this method will likely be more performant.