4 ms·
I think that this is a stretch of the term "purely functional". The relevant property is actually immutability, which looks nice. While immutability and funct
by ef4 14y ago
I think that this is a stretch of the term "purely functional".
The relevant property is actually immutability, which looks nice.
While immutability and functional programming often go together, they aren't the same thing.
- chriseidhof 14y agoIt is also about the way packages are specified: "Nix is a purely functional package manager. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built" (from the About Nix section on top of the page)
- bumeye 14y agoThere's also referential transparency. For programming languages, that means the result of a function is dependent on it's inputs ONLY. The function can not use any unspecified inputs like system time or an internal state. In Nix, that means a package can only depend on dependencies which are specified beforehand. It's nearly impossible to use libraries or binaries which you did not specify. That behavior makes it easier to reason about your whole system, like determining which packages are unused. This is similar to the advantages of referential transparency in functional languages
- emillon 14y ago> that means the result of a function is dependent on it's inputs ONLY Not quite, it means that a function call can be replaced by its value (A function can depend only on its inputs, yet write to a global variable, for example).