Skip to content

Commit 51e43e3

Browse files
Merge pull request #790 from wamirez/master
rephrase best practices for clarity
2 parents 3f5c86d + b1ae5e4 commit 51e43e3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/guides/best-practices.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ rec {
3131
{ a = 1; b = 3; }
3232
```
3333

34-
There are a couple of pitfalls:
35-
36-
- It's possible to introduce a hard to debug error `infinite recursion` when shadowing a name, the simplest example being `let b = 1; a = rec { b = b; }; in a`.
37-
- Combining with overriding logic such as the [`overrideAttrs`](https://nixos.org/manual/nixpkgs/stable/#sec-pkg-overrideAttrs) function in {term}`Nixpkgs` has a surprising behaviour of not overriding every reference.
34+
A common pitfall is to introduce a hard to debug error `infinite recursion` when shadowing a name.
35+
The simplest example for this is: `let a = 1; in rec { a = a; }`.
3836

3937
:::{tip}
4038
Avoid `rec`. Use `let ... in`.

0 commit comments

Comments
 (0)