Hacker News new | ask | show | jobs
by Blikkentrekker 4 days ago
That JSON prohibits trailing commata makes it an absolute pain to work with in practice.

I also like how in Haskell:

   something =
     { element
     , element1
     , element2
     , element3
     }
Is an actually idiomatic way to deal with the lack of trailing commata.
5 comments

I did something like that in C++ circa 1998, before seeing it anywhere else:

  MyClass::MyClass(foo bar, int arg1, int arg2)
  : Base(bar)
  , member1(arg1)
  , member2(arg2)
  {
  }
You see that style in SQL too.
Commata?
Not really? A linter/formatter takes care of it.