Re:Brilliant or insane code?
by _ZeD_ on Sunday September 01, 2013 @08:28AM
(#6310101)
the problem with this expression is that it doesn't "short circuit". Both "Thing 1" and "Thing 2" (in this cases object, but the can be function calls) are evaluated before the "some_boolean" usage.
[ Parent
| on HN ]
Re:Brilliant or insane code?
by TheLoneWolfling on Sunday September 01, 2013 @08:56AM
(#6310170)
That can be an advantage in some cases, however. Not generally, though.
In particular, if you want the side effects of both operations. Trying to write multiple things while checking if any of them failed, for instance.