aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/rl-next/inherit-from-by-need.md
blob: d198cf314771a193b9e31f41370fc134852f1056 (plain)
1
2
3
4
5
6
7
8
9
---
synopsis: "`inherit (x) ...` evaluates `x` only once"
prs: 9847
category: Fixes
credits: horrors
---

`inherit (x) a b ...` now evaluates the expression `x` only once for all inherited attributes rather than once for each inherited attribute.
This does not usually have a measurable impact, but side-effects (such as `builtins.trace`) would be duplicated and expensive expressions (such as derivations) could cause a measurable slowdown.