4 ms·
Ask HN: If both branches of an if expression are known …
if both branches of an if expression are known to be equal, does it make sense to skip the test and just emit the value?
https://twitter.com/ra/status/893111152561074176
- Davidbrcz 9y agoNo, the test might have side effects. If you are 100% sure there are none, then yes.