Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wish I had a good answer for you. I've been dissatisfied with Dhall, Nickle, Cue, and possibly others. Dhall's type system is both too strong (you have to plumb type variables by hand if you want to do any kind of routine FP idioms) and too weak (you can't really _do_ much with record types - it's really hard to swizzle and rearrange deeply nested records).

On top of that, the grammar is quite difficult to parse. You need a parser that can keep several candidate parses running in parallel (like the classic `Parser a = Parser (String -> [(a, String)])` type) to disambiguate some of the gnarlier constructs (maybe around file paths, URLs, and record accesses? I forget). The problem with this is that it makes the parse errors downright inscrutable, because it's hard to know when the parse you actually intended was rejected by the parser when the only error you get was "Unexpected ','".

Oh, and you can't multiply integers together, only naturals.

Maybe Nix in pure eval mode, absurd as that sounds?

I think the best thing for tools to do is to take and return JSON (possible exception: tools whose format is simple enough for old-school UNIX-style stdin/stdout file formats). Someone will come up with a good functional abstraction over JSON eventually, and until then you can make do with Dhall, YAML, or whatever else.



> Maybe Nix in pure eval mode, absurd as that sounds?

It doesn’t sound absurd, it’s pretty nice. What do you think about https://rcl-lang.org?


Just been reading the docs, I like it :)

Gonna have to set aside some time to play with it compared to HCL where I spend a lot of time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: