There are no good configuration languages in existence and there never will be. We have rejected Lisp/sexp so now we must suffer endlessly.
There are no good configuration languages in existence and there never will be. We have rejected Lisp/sexp so now we must suffer endlessly.
It has exactly five data types, each with very clear and distinct notation that nests consistently (the top level isn't somehow "special" and there's no messing with significant whitespace). Only two collection types: keyed, and unkeyed. In some sense it feels like the apotheosis of untyped data-modeling.
https://thedailywtf.com/articles/the-inner-json-effect
“Tell us what you did to JDSL,” one of the VP’s asked.
“I don’t think I did anything,” Jake answered. “I’ve only been here two weeks, trying to learn JDSL and how the customer portal works. I don’t even know how to deploy it!”
“You made a few commits to Subversion!” Tom shouted.
“Well, yes. I added a few code comments, trying to–”
“You can’t use comments in JDSL!” Tom shouted. “THAT’S WHAT BROKE IT!!”
JSON5 is probably the best option at the moment.
* Instantly obvious what the structure is (unlike YAML or TOML).
* Everyone knows JSON already. This just makes it a bit nicer.
* No noob security mistakes or type confusion caused by underquoting like YAML.
JSON is close to sexps, but it sucks when comments are not allowed.
[1] https://github.com/cuelang/cue/tree/master/doc/tutorial/basi...
So, the project you linked to is Java / Scala: https://github.com/lightbend/config
And there're also (basic? complete?) HOCON parsers in Javascript and Rust — I investigated this a while ago, because I want to use HOCON everywhere in my projects:
https://docs.rs/hocon/0.5.1/hocon/ (Rust)
https://www.google.com/search?q=hocon+javascript (Js, a few different)
The Rust version:
> This implementation goal is to be as permissive as possible, returning a valid document with all errors wrapped in `Hocon::BadValue` when a correct value cannot be computed
How nice :- ) (it seems to me)
That definitely seems like a solvable problem though.