News for hackers. Stuff that matters.
Re:Why 1 && 2 == 2 by lubomir on Friday July 19, 2013 @03:26AM (#6068768)
I would guess he/she meant something along the lines of x * some_really_complicated_expression. If x is 0, you would not need to evaluate the other operand at all. It may even be a faster, but I doubt any compiler does this sort of optimization, since it is not safe in languages with non-pure functions. The complicated expression could change some global state or perform input/output.

E.g. in Haskell, it would be possible to do this safely, because it is guaranteed by the type system that there are no side effects. However, even with literal 0 in the code the other operand still gets evaluated.

Re:Why 1 && 2 == 2 by valleyer on Saturday July 20, 2013 @06:27AM (#6074842)
Ah OK. That makes sense.