Hacker News new | ask | show | jobs
by reactormonk 1940 days ago
I 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
  }
1 comments

This 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.
IME people tend to just add stuff at the bottom. Doesn't help with ordered lists, though.