3 ms·
If the DSL logic is complex enough to require something approaching a turing complete language - which it looks like "jsonlogic" is, it's better to just provide
by crdoconnor 10y ago
If the DSL logic is complex enough to require something approaching a turing complete language - which it looks like "jsonlogic" is, it's better to just provide the functionality in a python library with a clean API rather than trying to invent your own DSL.
Turing complete markup-based DSLs have been created before - e.g. ant/maven/xslt - and in those cases it was a huge mistake to create an entirely new language that powerful.
If the DSL logic doesn't require a turing complete language - something much less powerful, it might be worth doing a DSL that has limited computational power.
IMHO this is a core principle underlies most computer languages: https://en.wikipedia.org/wiki/Rule_of_least_power https://en.wikipedia.org/wiki/Rule_of_least_power