3 ms·
You can have trailing commas just fine: https://github.com/dhall-lang/dhall-lang/pull/956 https://github.com/dhall-lang/dhall-lang/pull/956 However, `dhall for
by reactormonk 6y ago
You can have trailing commas just fine: https://github.com/dhall-lang/dhall-lang/pull/956 https://github.com/dhall-lang/dhall-lang/pull/956
However, `dhall format` is _very_ opinionated, and will remove it.
- andybak 6y agoDoes dhall format have an opinion about commas at the start vs end of lines? What's the recommended style?
- reactormonk 6y agoI formatted { foo = 3, bar = 4, baz = 5, verylongproperty = 6, dunnoneedsmoremore = 7, howmanytoforcealinebreak = 8 } And it forces the comma at the beginning of the line, Haskell-style: { foo = 3 , bar = 4 , baz = 5 , verylongproperty = 6 , dunnoneedsmoremore = 7 , howmanytoforcealinebreak = 8 }
- stickfigure 6y agoThis will not diff well if you add a new row at the beginning. It's the same problem with non-trailing-commas, but moved to the front instead of the end.
- Quekid5 6y agoIME people tend to just add stuff at the bottom. Doesn't help with ordered lists, though.