<p>In yesterday's email, I wrote about why <a href="/daily/2024/08/16/what-are-err--req-and-res">readable variable names are important</a> and why I use descriptive variable names in my code.</p>
<p>Given this pseudo-code:</p>
<pre><code class="php">function hande(req, res) {
}
</code></pre>
<p>With the short variable names, whilst you can guess, it's unclear what the variable names are.</p>
<p>However, in this code, we have the same variable names, but we also have additional type information:</p>
<p>Even with the same variable names, I know what their types are and what the function returns, I have better completions and diagnostics in my editor and better static analysis of my code, making it easier to identify and fix potential bugs.</p>
<p>In yesterday's email, I wrote about why <a href="/daily/2024/08/16/what-are-err--req-and-res">readable variable names are important</a> and why I use descriptive variable names in my code.</p>
<p>Even with the same variable names, I know what their types are and what the function returns, I have better completions and diagnostics in my editor and better static analysis of my code, making it easier to identify and fix potential bugs.</p>