3 ms·
> If you pick a single file from nixpkgs without context, you can't get much information from it at all (other than a lot of unknown types being passed to thing
by hamandcheese 4y ago
> If you pick a single file from nixpkgs without context, you can't get much information from it at all (other than a lot of unknown types being passed to things that accept an unknown type) - it's only in the context of an evaluation of a graph node that uses that file that you can infer anything meaningful about it (and even then that information is only relevant in that context).
This is exactly where types would be the most beneficial, and what makes nix so hard to read. If a nix function could specify the types of its arguments, then I might have a chance of better understanding it.
Just because most nix functions currently don’t have many constraints on their inputs doesn’t mean that they couldn’t in the future.
> it's only in the context of an evaluation of a graph node that uses that file that you can infer anything meaningful about it (and even then that information is only relevant in that context)
That’s how nixpkgs works now. But we can make functions that work only in more limited contexts.