|
|
|
|
|
by takeda
2208 days ago
|
|
Looking at the code, I don't see any advantage of using imperative language here. All the conditions used there are already available and don't change during the execution of that code. So the conditionals would be nearly identical in functional language. Nix advantage here would be that is lazily evaluated, so there would be an additional benefit that only conditionals that are used are evaluated. Functional benefit of Nix would be that Nix would know that a package doesn't need to be rebuilt if no inputs changed. Side note Mozilla actually uses Nix internally, it appears that it is used for Rust and Firefox and most likely other things[1][2] [1] https://github.com/mozilla/nixpkgs-mozilla [2] https://github.com/mozilla/release-services |
|
Yes, except that I can read this and I can't read nix. That's probably based on background, but more people are familiar with imperative than functional languages.
> Nix advantage here would be that is lazily evaluated, so there would be an additional benefit that only conditionals that are used are evaluated.
Agreed, although that's unlikely to be unique to nix?
> Functional benefit of Nix would be that Nix would know that a package doesn't need to be rebuilt if no inputs changed.
As would anything that can compare hashes. Or heck, make(1) can do as much.