News for hackers. Stuff that matters.
Re:Why are we templating YAML? by Cyph0n on Thursday February 07, 2019 @09:15PM (#19110868)
What is up with the strange comma positioning? I assume that’s just a stylistic choice?
Re:Why are we templating YAML? by jtdev on Thursday February 07, 2019 @09:40PM (#19111017)
It allows each line to be completely independent of it’s neighbors; you can comment and/or add lines without needing to touch neighboring lines. Also, it makes it visually easy to spot missing commas. Give it a try sometime, it’s actually quite nice.
Re:Why are we templating YAML? by yzmtf2008 on Friday February 08, 2019 @02:43AM (#19112264)
Wouldn't this also be solved by allowing trailing commas?
Re:Why are we templating YAML? by heavenlyblue on Thursday February 07, 2019 @11:19PM (#19111491)
But they are not independent: first line doesn’t have one.
Re:Why are we templating YAML? by hazz99 on Thursday February 07, 2019 @09:55PM (#19111114)
Also makes nice file diffs!
Re:Why are we templating YAML? by nhooyr on Thursday February 07, 2019 @10:15PM (#19111207)
Wouldn't the same thing occur if it wasn't there at all?
Re:Why are we templating YAML? by merijnv on Friday February 08, 2019 @05:05AM (#19112876)
Having prefixed commas is a rather common style in the Haskell community, because it ends up nicely matching open/closing brackets/braces and lining things up.

Since the author of Dhall comes from the Haskell community, he's kept this style.

Re:Why are we templating YAML? by Gabriel439 on Friday February 08, 2019 @10:27AM (#19115043)
Author here: This is correct. I'm just borrowing a Haskell convention. Also, I like this convention because it leads to vertical alignment of commas.