4 ms·
> This is the major problem with most comparisons of config file formats: the actual semantic domain of a config file format is extremely limited [ ... ] So, w
by jnxx 3y ago
> This is the major problem with most comparisons of config file formats: the actual semantic domain of a config file format is extremely limited [ ... ]
So, why not use Scheme ?
- mindslight 3y agoScheme lacks most syntactic affordances that imply semantics. Even if some of those implications are dead wrong, they're still useful. Personally I think the right answer for configuration files is to define them in terms of a generic object model. A program could even support multiple formats (TOML+JSON+YAML). If a user dislikes all the supported formats or the file is generated with something like NixOS, it can be handled with straightforward conversion.
- withinboredom 3y ago> A program could even support multiple formats I invite you to check out Symfony where you configure your app using yaml, attributes in code, code itself, or a mix of all the above. You will cry.
- deleted 3y ago[deleted]
- mindslight 3y agoPoint taken, but it would seem the problem there is probably due to the arbitrary placed mixins? My proposal was more for a single configuration object, just in whatever actual syntax you (or your team) prefers. If someome runs away with that and writes json that includes yaml that includes python that generates configuration from what it found on the filesystem, responsibility for that needless complexity rests squarely on the shoulders of the new programmer.
- rini17 3y agoHaving syntactic affordances for every nuance of semantics is what led to the current state of zoo. What is wrong with having trivial syntax and distinguishing semantics by labeling parts of the syntax tree with symbols?
- mindslight 3y agoSpecifically with scheme, I believe the main problem is the symbols lack any distinction to know the difference between a function call and a syntactic form. (Don't shoot the messenger, I've done my fair share of scheme. I've also done a lot of thinking about why some people are so turned off from the syntax, and it's certainly not that the opening parenthesis is in a slightly different place on the prefix function calls)
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- lapinot 3y agoSome do, using s-expr as config files is pretty common in the ocaml ecosystem (ie dune).