Nix Language Quirks: Difference between revisions

with and let: Slightly reword and link to best practices guide
Tags: Mobile edit Mobile web edit
m with and let: fix capitalization
Tags: Mobile edit Mobile web edit
Line 24: Line 24:
[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.
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 ==