Remix.run Logo
qcnguy 2 days ago

Apple has a similar project called Pkl which they use for their internal cloud configuration. http://pkl-lang.org/

It can be converted to JSON, yaml, and a bunch of other formats, and whilst it looks a bit like JSON it's actually a full blown functional programming language designed for creating config trees. The nice thing about Pkl is that it's got full IDE support and the standard library is patterned after Kotlin. So all the method names are very obvious and intuitive especially if you know Java or Kotlin. It has lots of features for validation like range types and so on, so you can get a lot of semantic checking before any config is emitted. It's the first config-as-language language I've seen that is actually good.

KSON looks more like an alternate syntax than a language, which is fine, but because JSON/YAML are just data structures sometimes you really want to do a for loop.

wpm 2 days ago | parent [-]

Pkl ended up being a bit much for what I was doing but I spent a few days digging into it and really liked what I saw.