Re:Google broke a conditional statement that verifies passwo...
by GoblinSlayer on Friday July 23, 2021 @06:37AM
(#27929180)
The code is correct if you hit yes() and no() correctly depending on three conditions. There are 8 possibilities in both cases and thus you need 8 tests in both cases. Shortcircuiting is optimization, it doesn't reduce complexity of the logic.
[ Parent
| on HN ]
Re:Google broke a conditional statement that verifies passwo...
by thaumasiotes on Friday July 23, 2021 @04:21PM
(#27935153)
That is a concern, but it's not one related to how many branches exist in the code.
"How did we get here?" and "Are we in the right place?" are distinct questions.