Parenthesis ( ) are used in the example here:
|
({ a ? 1, b }@args: args.a) { b = 1; } |
But their syntactical use and meaning in the Nix language has not been defined.
In the Nix language, parentheses are primarily used to group expressions, control the order of evaluation, and encapsulate language elements to disambiguate their boundaries within larger expressions.
[Edit] This usage does not fall into my previous definition:
|
inherit (otherAttrs) email; # equivalent to `email = otherAttrs.email`; |
Should a statement about parenthesis include the syntax that can be used for "inherit"?
Also ( ) can be used to control the scope of the "with" statement:
|
in with attrs; (/* this is the scope of the `with` */) |
Can ( ) be used to control the scope of variables in general? (visibility / lifetime scope?)
Parenthesis ( ) are used in the example here:
nix-1p/README.md
Line 289 in 1cf10d3
But their syntactical use and meaning in the Nix language has not been defined.
In the Nix language, parentheses are primarily used to group expressions, control the order of evaluation, and encapsulate language elements to disambiguate their boundaries within larger expressions.
[Edit] This usage does not fall into my previous definition:
nix-1p/README.md
Line 344 in 1cf10d3
Should a statement about parenthesis include the syntax that can be used for "inherit"?
Also ( ) can be used to control the scope of the "with" statement:
nix-1p/README.md
Line 363 in 1cf10d3
Can ( ) be used to control the scope of variables in general? (visibility / lifetime scope?)