2 ms·
No, an interpreter cannot short-circuit a zero multiplication. This is because the expressions could be functions that raise exceptions. e.g. 0 * (0/0) e.g. f
by nayuki 10y ago
No, an interpreter cannot short-circuit a zero multiplication. This is because the expressions could be functions that raise exceptions.
e.g. 0 * (0/0)
e.g. f() * raise_some_exception()
- mangeletti 10y agoAh, of course. In hindsight, I now feel pretty silly even asking that.