Replies: 2 comments
-
Lua is a lightweight scripting language, making it suitable for configs where you may repeat yourself a lot, often in applications which are heavy enough to justify including a scripting language as part of it. It is also, like most formats, strictly Key-Value where kdl is node based, this is also true for the other formats you mention.
RON is a format designed for and that works well with Rust and the way it stores and handles data. It supports structures for data, proper sum types, and optional values. It is sort of like a "JSON++", despite not being a superset of it. It is suited for config formats, data serialization (more so in local applications like games, configs, rather than over the net like JSON)
I don't know much about DHall, but I believe it has small scripting capabilities like Lua. From a quick look, it appears to be sort of like Nix. |
Beta Was this translation helpful? Give feedback.
-
Yeah, lua is just straight up a programming language, and dhall is a "programmable config language", so basically a simple programming language. Both are far outside the scope of what KDL is trying to do. RON is comparable, but its goals are to be close to Rust syntax, and it pays for that in a decent degree of complexity - there are several different types of nodes, each with their own syntax. In general KDL can encode the same things much more simply, for example:
vs the same in KDL
tho to be fair, the RON example partially looks worse just due to the excess whitespace and comments. Stripping it down equivalently:
It doesn't look quite as bad, but there's still several distinct syntaxes on display for largely the same things. In Rust those syntaxes are well-justified, but for general purpose data it's a bit much. |
Beta Was this translation helpful? Give feedback.
-
https://kdl.dev mentions a couple of other config languages in comparison to kdl, which is very helpful. somebody of you has similar insight for:
Beta Was this translation helpful? Give feedback.
All reactions