Hacker News new | ask | show | jobs
by koiueo 319 days ago
I rarely downvote on HN, but when I do, it must be a comment promoting JSON over any other configuration language (sorry)

Nix isn't even that arcane. Its documentation simply sucks. Once you grasp the idea, it feels almost great

2 comments

> Nix isn't even that arcane.

It's somewhat quirky though :)

https://nixos.wiki/wiki/Nix_Language_Quirks

https://md.darmstadt.ccc.de/xtNP7JuIQ5iNW1FjuhUccw

(but then again, what language isn't...)

Why not just use BASH or Python?
The fundamental basis of Nix is that it's a purely functional programming language without side effects. The whole thing breaks apart otherwise. And with a purpose-specific programming language, there's some big quality of life things (for example, low friction multiline strings with interpolation, the ability to use dashes in identifiers for package names, ...).

(and, when you can do without side effects, functional programming is really simple and productive!)

To be fair,the Nix code in a very simple config probably looks like some weird JSON like derivative to a layman because of how brackets heavy the language is.

I could see someone glancing over a tutorial and thinking "they should just use JSON instead of their own custom data format" without realizing that Nix is a functional programming language.