Login
You're viewing the code4lib.social public feed.
  • Feb 14, 2026, 10:26 AM

    @grahamperrin

    As a concrete example: many years ago it was a struggle to make a change that allowed putting braces around single-statement bodies of if statements. It was previously disallowed entirely, now it is optional. This is a common source of bugs when people make changes to a file and add another statement to a conditional, or simply misread the behaviour. Even when they do it correctly, it makes the diffs harder to review because the lines above and blow are changed to add braces. This composes particularly badly with the rule that open braces go on the line with the if statement (ignoring the other reasons that is bad) because it means now the s up in the diff and reviewers need to read it to see that the only change is adding a brace at the end. All of this increases cognitive load that could be better spent seeing if the logic is correct.

    💬 0🔄 0⭐ 0