|
From: | Paul Eggert |
Subject: | Re: gawk-5.1.1 bug report |
Date: | Wed, 6 Apr 2022 01:13:28 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
On 4/6/22 00:04, arnold@skeeve.com wrote:
IMHO clear code beats saving a single branch
Sure, but clarity also argues for "&" over "&&" here. Writing "f(x) && f(y)" would incorrectly imply that it's important that f(y) should not be evaluated when f(x) is false, an implication that is incorrect here. Writing "f(x) & f(y)" tells the reader that both sides are safe to evaluate and that they can be evaluated in either order, something I found worth knowing when I read that part of the code.
[Prev in Thread] | Current Thread | [Next in Thread] |