Re:If-then-else had to be invented
by DaiPlusPlus on Sunday December 13, 2020 @01:47PM
(#25408970)
VB.NET also uses “OrElse” and “AndAlso” for short-circuiting. VB6 didn’t support short-circuiting at all.
[ Parent
| on HN ]
Re:If-then-else had to be invented
by MaxBarraclough on Sunday December 13, 2020 @05:53PM
(#25411249)
Good example, I'd forgotten about that.
On second thought I was mistaken about the example I gave. If someone says You can have tea OR coffee they're really expressing a NAND. You can have at most one out of the two options. Unlike with XOR, you're permitted to have neither.
To express XOR, you'd need to say You must have tea or coffee.