[Nix-dev] Re: args: with args

Ludovic Courtès ludo at gnu.org
Tue Mar 11 09:34:31 CET 2008


Hi,

Armijn Hemel <armijn at uulug.nl> writes:

> The parameters fetchurl, stdenv and perl appear three times: two times
> in the top level file and twice in the other Nix expression. The "args:
> with args" construction would just weed out one occurence but force me
> to look at the top level file to see what the parameters were again. So,
> in my opinion readability (and usability) is actually reduced.

I have the same feeling.  This construct also makes it easy to implement
"ambient authority" [0], where you'd just pass anything to the Nix
expression, making it hard to determine what it really needs.

> Bigger scope: right now there are quite a few different styles that are
> used to make expressions. To be honest, I'm not too happy with that
> either. It looks messy and it is confusing, since it needs quite a few
> brain twists on my side to see what is going on.

Agreed.  One thing I don't fully understand is the coexistence of
`stdenv.mkDerivation' and `builderDefs'.

There are also stylistic inconsistencies in places (indentation, naming,
etc.), but these are less disturbing.

Thanks,
Ludovic.

[0] http://en.wikipedia.org/wiki/Ambient_authority




More information about the nix-dev mailing list