Nix Evaluation Performance: Difference between revisions
imported>Infinisil mNo edit summary |
imported>Sternenseemann m Fix "Hello ${name}" desugaring |
||
| Line 23: | Line 23: | ||
#: This includes <code>integers</code>, <code>floats</code>, <code>strings</code>, <code>paths</code>, <code>booleans</code> and <code>null</code> | #: This includes <code>integers</code>, <code>floats</code>, <code>strings</code>, <code>paths</code>, <code>booleans</code> and <code>null</code> | ||
#: This means that when you see e.g. <code>"hello"</code> or <code>true</code> in Nix, you know that Nix won't allocate a thunk for that. The reason for this is that there's not much to evaluate there, putting it into a thunk wouldn't make much sense. | #: This means that when you see e.g. <code>"hello"</code> or <code>true</code> in Nix, you know that Nix won't allocate a thunk for that. The reason for this is that there's not much to evaluate there, putting it into a thunk wouldn't make much sense. | ||
#: Note however that this is ''not'' the case for <code>"Hello ${name}"</code>, because that is desugared to <code>"Hello" + name</code> underneath, which won't be a string by itself anymore | #: Note however that this is ''not'' the case for <code>"Hello ${name}"</code>, because that is desugared to <code>"Hello " + name</code> underneath, which won't be a string by itself anymore | ||
# Nix won't create thunks for referenced variables | # Nix won't create thunks for referenced variables | ||