If that's true, then what we really want is a way to give everyone a syntax they are most comfortable with, so they have the shortest learning curve. Some people like declarative languages; some like imperative; some want configuration files; some dislike learning languages and want a GUI; some want to use natural language. So in the end we'll end up with N syntaxes (broadly-construed), each tailored to their audience. A declarative language is (often) all about logic after all, so why does the syntax actually matter?
I pushed this thesis a bit and designed a YAML syntax for Rego (OPA's policy language), in addition to the DSL OPA has supported for years. More interestingly, I put together a translator that moves the logic back and forth between the YAML version and the DSL version. The idea being that people can write policy in whichever syntax they prefer, and tooling can translate between. Not complete yet, but far enough along to get a feel for it. Longer term, I could imagine a python-inspired syntax; one for golang; etc.
It'd be great to get feedback on a couple of things.
1. Overall value of multiple syntaxes for a (declarative) language with tooling to translate between.
2. Thoughts specifically on whether adding the YAML version of Rego demoed here seems beneficial.
No comments yet.