Live data from Hacker News

Dhall: A Non-Repetitive Alternative to YAML

dhall-lang.org

11–20 of 181 posts

Re: Dhall: A Non-Repetitive Alternative to YAML

#11
post #5
post #3

Earlier quoted context omitted.

Makes it easier when commenting out. Use this trick for SQL and JS too (to prevent trailing comma issue)

I don't get why you'd build a language in 2019 which disallows a trailing comma in lists.

Yep. The solution to comma issues isn't to put every single one in a place nobody usually puts them - it's to be more forgiving about allowing the occasional trailing one.

Re: Dhall: A Non-Repetitive Alternative to YAML

#12

Still much prefer HJSON ( http://hjson.org/ ) for stuff that people might need to touch. If it's truly for end-users (read: non-admin/dev types), you probably shouldn't have them touching configuration files _at all_.

How is this at all related to Dhall? It looks like a completely different thing with a completely different purpose.

Re: Dhall: A Non-Repetitive Alternative to YAML

#13
To me, worrying about config files seems like the ultimate exercise in bikeshedding.

You either need a simple list of items (eg. dependencies) or key/value pairs. Use a text file or yml or json or whatever.

Or you need templating, the use of functions, etc, like dhall provides. But then, why not use the language you're already using for the rest of your project, or a bash script to export some variables?

Might sound like I'm throwing sourness around, but I just don't see the niche for this, except inventing a new thing for the joy of it?

Re: Dhall: A Non-Repetitive Alternative to YAML

#15
post #7
post #6

Dhall keeps popping up on HN. Here what I don't like about it: - Why use '=' instead of ':' for attributes? If you used ':', then '=' could be variable assignment and eliminate the need for 'let'. - Why is there a need for commas? - Why quote via ticks?! Gee! - What's with the '{-' and '-}' for comments?! It's like its author decided to differ at any price ! In general, good ideas, but it's too weird and unnecessaril…

Dhall heavily borrows both ideas and syntax from the ML family of languages. E.g. Haskell, OCaml, Elm, Purescript Colons are used for type signatures. Commas are presumably required because you can have multi line and nested records. (don't quote me on this, not a parser expert) The comment syntax is from Haskell. Not saying this syntax is familiar to everyone , but it is familiar to some. The lineage of the syntax m…

Yeah, but how is this relevant? YAML, for example, makes JSON a subset, which lets it consume existing JSON without any need for conversion. It's easy to learn, and readable. Leading commas are eyesores. Plus, not everybody is a fan of ML! These are not mass market languages.

Re: Dhall: A Non-Repetitive Alternative to YAML

#16
post #9
post #7

Earlier quoted context omitted.

Dhall heavily borrows both ideas and syntax from the ML family of languages. E.g. Haskell, OCaml, Elm, Purescript Colons are used for type signatures. Commas are presumably required because you can have multi line and nested records. (don't quote me on this, not a parser expert) The comment syntax is from Haskell. Not saying this syntax is familiar to everyone , but it is familiar to some. The lineage of the syntax m…

Weird that it's billed as an alternative to YAML, but effectively has zero roots or influence from YAML. Looks more like an alternative to... whatever configuration language is popular in ML language projects?

Its more like an alternative to scripts generating configuration from templates. they claim that this is better because you cant for example write an infinite loop ruining the script.

Re: Dhall: A Non-Repetitive Alternative to YAML

#17
post #12

Still much prefer HJSON ( http://hjson.org/ ) for stuff that people might need to touch. If it's truly for end-users (read: non-admin/dev types), you probably shouldn't have them touching configuration files _at all_.

How is this at all related to Dhall? It looks like a completely different thing with a completely different purpose.

They are both text based configuration file formats made to be easier for humans to interact with, so I'm not sure what you're confused about?

Re: Dhall: A Non-Repetitive Alternative to YAML

#18
post #5
post #3

Earlier quoted context omitted.

Makes it easier when commenting out. Use this trick for SQL and JS too (to prevent trailing comma issue)

I don't get why you'd build a language in 2019 which disallows a trailing comma in lists.

There's absolutely no need for commas in a configuration language, in my opinion.

Re: Dhall: A Non-Repetitive Alternative to YAML

#19
Hmm...

So the authors claim that their language is guaranteed to terminate for all well-typed programs. That is actually a nice spot for configuration languages. Yet, I wonder how

a) they guarantee it, as I have seen no obvious link to the language's semantics

b) useful this is in practice.

Nevertheless, very nice approach, indeed.

Post reply on HN