4 ms·
Funny enough, I've implemented a config language that fits exactly this bill https://github.com/gilbert/zaml https://github.com/gilbert/zaml An example (also s
by simplify 5y ago
Funny enough, I've implemented a config language that fits exactly this bill https://github.com/gilbert/zaml https://github.com/gilbert/zaml
An example (also see it in the online editor[0]):
users {
andy
beth {
admin true
}
carl
}
The author is right that you gain syntax benefits when you define a schema. For those who say this adds cognitive overhead, it actually doesn't; the schema and compiler are able to reduce that overhead, because if you make a mistake, you get a nice, accurate error message.
[0] https://gilbert.github.io/zaml/editor.html#s=N4IgzgxgFgpgtgQxALhMABAVzDATmZAGwEswAXACnN2AQBM5iA7ZAIwHt3CBfASnW4gANOHaZcEGChDY8YdMAA6TdOgRM6AT2WrWMMlAU7Vahs3RlcmGMe7GICXIWV2mIbkA https://gilbert.github.io/zaml/editor.html#s=N4IgzgxgFgpgtgQ...