How much information is too much information? (2022)
Interestingly, I had the exact opposite reaction. I found the second function harder to reason about because it heavily relies on mutation and the fact that individual loop iterations commute with respect to one another. (To understand what the final value of `min_value` is, you first have to understand that `&lt;` being transitive means that the iteration order doesn&#x27;t matter)<p>The first function, on the other hand, has only static assignments (one name is only ever bound to a single &quot;definition&quot; at any one time). In terms of working memory, that means that each variable in the first function only occupies a single &quot;slot&quot;. In the second function, the mutable `min_value` variable necessarily occupies multiple &quot;slots&quot;, one for each point in the program where the variable could change. So you&#x27;d have to keep track of a &quot;min_value[0] = 9999&quot;, a &quot;min_value[1] = number (if number odd &amp;&amp; &lt; min_value)&quot; and _maybe_ a &quot;min_value[2] = min_value (if number even || &gt; min_value)&quot;.