3 ms·
This assignment-then-conditional-reassignment is admirably compact and, in languages like C/Java might well be the most elegant way to handle this. On the down
by AgentOrange1234 4y ago
This assignment-then-conditional-reassignment is admirably compact and, in languages like C/Java might well be the most elegant way to handle this.
On the downside, this breaks single-assignment, binding style variables. That is, now deliveryTime can’t be final/val/const.
I wish I had a better solution. Lisp did this so well with if/cond/etc as expressions.