3 ms·
And what's the alternative for if(A && B){ x(); }else{ y(); }? Seems very easy to shoot yourself in the foot with this approach.
by pieguy 13y ago
And what's the alternative for if(A && B){ x(); }else{ y(); }? Seems very easy to shoot yourself in the foot with this approach.
- anonymous 13y agoWell, you could if (one) { if (two) if (three) if (soon) { stuff }} else { else stuff } Personally, I think I won't have any trouble reading that, but I have noticed I'm somewhat more tolerant than others in this regard. Though I am more OCD than others in other ways.
- ernesth 13y agoHere, the x() and y() are assignments, so it's easy: ret = 0; //y() if (A) if (B) ret = 1; //x() If the else statement is more involved, it gets difficult.