4 ms·
I think I would agree as well. So I’m not sure how that makes me feel about nix.
by baby 4y ago
I think I would agree as well. So I’m not sure how that makes me feel about nix.
- xxpor 4y agoNix is different because no one's smart enough to figure how how to do silly things ;)
- pxc 4y agoNix is Turing complete, but it's not a general purpose language. It is designed as a DSL for building software, and I think it's pretty nice for that. The Nickel rationale doc has some thoughts on why this might be the right call: https://github.com/tweag/nickel/blob/master/RATIONALE.md#turing-completeness https://github.com/tweag/nickel/blob/master/RATIONALE.md#tur... From my (limited) experience with another deliberately limited configuration DSL (CUE), I think more power in such DSLs will pan out better in the long run. Of course, it's not all one or the other: a powerful build DSL can still enforce useful discipline, and a Turing-complete language can still be thoughtfully designed around a special purpose. I think Nix demonstrates both pretty well, actually.
- tadfisher 4y agoNix forces you to serialize every build step (what it calls a "derivation"), and moreover it isolates the build environment to only include things built with Nix or verified by hash. So while there is a lot of power, the only thing you can do with that power is produce derivations which themselves actually run the build. Contrast this with Gradle, which is currently digging itself out of a hole by forcing authors to declare all inputs and outputs of their tasks so it can serialize them, but you can literally do anything Java can throughout the entire process. This is the kind of Herculean task which is neatly sidestepped by tightly controlling the DSL environment (inputs/outputs) as does Nix.