[Nix-dev] Re: args: with args

Ludovic Courtès ludo at gnu.org
Tue Mar 11 10:50:40 CET 2008


Hi,

Marc Weber <marco-oweber at gmx.de> writes:

> Agreed. But how to you test wether something is really needed?
> I do be removing it and seeing wether it still works.
> And that's done faster using args ; with args, isn't it? (my 2 cents)

Sure, but it's a bit tedious.

In a way, "args: with args;" is comparable to argument passing in shell
scripts: you don't tell how many arguments the function will take, nor
what their name is, nor whether you actually use them.

In practice, for this to be tractable, you quickly end up defining
conventions to restrict what the language doesn't impose.

> About "ambient authority": agreed unless we limit arguments passed
> by (import foo/bar) { < limited list > }
> thus keeping at least one filter filering the global all-packages name
> space. So this is indeed one point for "best practises" or a "good
> style" documentation page.

Again, the language could/should be helpful.  Relying only on "best
practices" and conventions, as opposed to language support, seems
fragile.

Thanks,
Ludovic.




More information about the nix-dev mailing list