Compiler: Dhall as configuration language for Elm packages.

Created on 30 May 2019  路  3Comments  路  Source: elm/compiler

Hi there :hugs:

There is an awesome language called Dhall which shows tons of potential use cases as a configuration language and data exchange engine and it happens to be very similar to Elm since completely written in Haskell.

Additional Details

Dhall already provides compiler to JSON and YAML. This means we can choose between using dhall natively by adding Elm support to it and/or compiling dhall into our json files. Here is a link to the Github repo.

Similar to Elm Markup can it complete the Elm ecosystem in order to unify the tooling to a complete Elm (like) experience.

Thanks a lot for your attention.

Most helpful comment

With past proposals to switch to YAML in elm.json, the thinking was:

  1. There are always going to be new formats being created that can do it better (by some definition) and it is difficult to weigh the particulars.
  2. Using JSON has the advantage that most web developers will know the format already from doing HTTP requests. And if they do not, the learning will directly help them when they want to make those HTTP requests.

As someone who is always confused in YAML files about indentation and where commas are needed, I think point (2) is a really strong advantage.

So I can imagine changing the format of elm.json someday (or allowing a new format) but I think that would be based on changes in the overall usage patterns of HTTP requests in web development.

All 3 comments

With past proposals to switch to YAML in elm.json, the thinking was:

  1. There are always going to be new formats being created that can do it better (by some definition) and it is difficult to weigh the particulars.
  2. Using JSON has the advantage that most web developers will know the format already from doing HTTP requests. And if they do not, the learning will directly help them when they want to make those HTTP requests.

As someone who is always confused in YAML files about indentation and where commas are needed, I think point (2) is a really strong advantage.

So I can imagine changing the format of elm.json someday (or allowing a new format) but I think that would be based on changes in the overall usage patterns of HTTP requests in web development.

While I think json is fine here are two things, I really dislike:

  • The already mentioned lack of comments
  • That you can't have trailing commas after every item (as that would make diffs nicer)

This is why the transpiler to JSON comes in handy since it offers us to use both.

While I am quite used to the fact, that the Elm community ignores basically every single sentence I have ever spelt within it and turns it upside down.

It is also always difficult to weight the participants, that is almost always the case in software. So nice, that this proposal opens up the way of choosing freely between one modern and one compatible way and combines them both in the same package. :hugs:

Was this page helpful?
0 / 5 - 0 ratings