[Nix-dev] An issue regarding the default parameters of a function

Vladimír Čunát vcunat at gmail.com
Fri Feb 12 12:21:39 CET 2016


Hi.

On 02/12/2016 12:11 PM, Sergey Mironov wrote:
> I have an issue regarding the combination of two Nix features:
> default parameters ( f = {arg ? def } : ...) and arbitrary length
> parameters (f = args@{arg, ...} : ...).

@-pattern binds exactly what was *passed* to the function. Eelco
considers that a feature IIRC. There's been a discussion about this on a
couple of nix issues on github.

Personally, I would prefer to bind the attrmap after substituting
defaults, as that seems much more useful, but that would be a
non-compatible change to nix...

--Vladimir


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3771 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160212/9841115c/attachment.bin 


More information about the nix-dev mailing list