Nix Language Quirks: Difference between revisions
→Integer precision: add 64-bit reference link Tags: Mobile edit Mobile web edit |
→with and let: Slightly reword and link to best practices guide Tags: Mobile edit Mobile web edit |
||
| Line 20: | Line 20: | ||
2 </syntaxHighlight> | 2 </syntaxHighlight> | ||
In this case, <code>with</code> and <code>let</code> have different priority when resolving names. | |||
[https://github.com/NixOS/nix/issues/1361 Good discussion on this topic] | [https://github.com/NixOS/nix/issues/1361 Good discussion on this topic] | ||
Generally the use of <code>with</code> is discouraged. See the [https://nix.dev/guides/best-practices#with-scopes Best practices guide] for how best to use <code>inherit</code> as an alternative. | |||
== Old <code>let</code> syntax == | == Old <code>let</code> syntax == | ||