Replacement for JSON in Elm

Hi there :slight_smile:

I read this and wrote that

I suggest to discuss the whole thing here and using the Github issue itself for concrete stuff. Or however you want :sunny:

Happy to read your comments.

1 Like

So you are suggesting something like elm.dhall instead of elm.json?

1 Like

The two articles are targeting different use cases.

One is for Data interchange (machine to machine), another is configuration (human to machine + human to human).

The confusion may come from the fact that JSON is used in all four cases (machine to machine, machine to human, human to machine and sometimes human to human)

For configuration file it is a trade-off between writ-ability (human to machine) verses readability (human to human). Configuration has reasons to be complex, as in the case of the nix package manager. But for Elm the Dhall format IMO is too complex for a rather simple configuration.
The only significant downsides that I see regarding using JSON as configuration is the lack of comments. Comments are quite crucial for a proper description of configuration to others or future self. Iā€™d suggest TOML to improve configuration experience over JSON for the comments and better readability, but the benefit seems too little compared with the comparability break.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.