@lobingera It also does validation. So you could use another scripting language ...

@david_chisnall@infosec.exchange

@lobingera

It also does validation. So you could use another scripting language if the flow were that the user writes a program that generates a set of objects and then you validate them and report errors. But then you have a lot of work to do to make it easy for users to understand where they created something that failed validation.

It is useful for a configuration language to have a distinct language and data model. For example, if you want to specify a size, the data model should provide a way of specifying that it’s a size in bytes encoded as an integer, but the language should let users write 4 GiB and that be unambiguous. You can build that into any language.

But the main benefit of something like PKL is that the mapping from language to data model is not specific to a single program. If someone wrote, say, a generic config DSL in Lua, and made it easy to use from languages that can embed Lua, that would be a good alternative.