Re:Nix: An idea whose time has come
by tadfisher on Friday February 18, 2022 @09:46PM
(#30393961)
Sort of. There are no real side effects, just lazy evaluation. Every entry point into `nix build` evaluates one expression to produce one output, but in the process, ends up evaluating the outputs of all the dependent expressions as well. The Nix store essentially caches the results of these evaluations, which looks very much like a traditional package manager "installing" packages to the file system.
[ Parent
| on HN ]
It's kind of like how an implicit side effect in "normal" FP languages is that memory is being allocated.
The nix garbage collector will even free up disk space by deleting unreferenced packages just like a garbage collector freeing memory by deleting unreferenced values.