title |
---|
Tiny DSLs |
The Power of Tiny DSLs{.ui .large .label}
u/pimiddy writes:
I can relate to that. Working on my project, I nee ded to construct some tiny bash shell oneliners (think
a -foo "bar" && b || c
) and then pass them toprocess
. I could've opted for simple string concatenation, but I decided to create a small DSL for "and", "or" , "command", "subshell" and so on. It worked beautifully!