http://qs321.pair.com?node_id=935673


in reply to Re: logical non-short-circuit operators
in thread logical non-short-circuit operators

I strongly agree.   When I read this code, it is immediately obvious that “the designer’s intent” is that both function calls will be and should always be executed.

Years ago, the manufacturers of a debugging tool would publish in Dr. Dobb’s Journal a short excerpt of “C” code with the challenge to figure out what the code actually did.   My impression was always, “gee, I can’t afford to use a language like that encounter code written like that.”   (Note that I’m not talking about the debugger tool that was being advertised.)   Code has to be clear and obvious above all other things, such that anyone who might be reading the unfamiliar code (perhaps under conditions of pressure and great haste) can instantly and correctly understand it.   The compiler can take care of itself.   (A tiny scrap of code, written by persons unknown, a mere four lines long but buried out of sight, once cost me $10,000 in real money.)