Change `dhall format` to use ASCII by default?

@sjakobi: Good catch! Yeah, I will do that

Also, I’m thinking of adding questions to this year’s survey to help us gather data on this subject. The questions I’m considering are:

When typing Dhall symbols in my editor (before formatting the code) I use:

  • [ ] ASCII
  • [ ] Unicode

When formatting my code, I use:

  • [ ] Nothing (I don’t format my code)
  • [ ] dhall format
  • [ ] dhall format --ascii

I prefer to read Dhall code written using:

  • [ ] ASCII
  • [ ] Unicode
3 Likes

Yeah, that sounds good! :+1:

I actually find this a little irksome with spago having git diffs because the formatter’s default is unicode and running spago upgrade-set doesn’t follow the default and I do a manual change later. Without passing a spago --use-unicode upgrade flag and having a fork in all projects consuming Dhall, is there any interest in seeing some sort of rc file read on what the user or project prefers as their default so your team can be on the same page?

I agree with all the above arguments on approachability and personally found the unicode support a shiny, cool thing that made me more likely to use the language. I like that Gabriel said indefinite support. It reminds me of Sass: I always loved and preferred the indented syntax, but the SCSS syntax won out because of approachability and similarity with CSS; and as such the tooling chose SCSS to be the default shown, but the support of Sass’s indented syntax was slated to be supported indefinitely (though I moved to SugarSS for different reasons later).

Starting in the next dhall release, dhall format will detect the pre-existing character set of a file and stick to it when formatting the output: https://github.com/dhall-lang/dhall-haskell/pull/2108

1 Like