This may be a religious argument, but it has been debated ad-nauseum here at my work whether all IF statements should include an ELSE clause – even if the ELSE clause only contains a comment stating that it was ‘intentionally left blank’.
I have heard arguments for both sides:
The ‘For’ camp – ensures that the code has actually addressed whether the condition requires an ELSE clause
The ‘Against’ camp – code is harder to read, adds too much noise
I am interested in any other points of view as I have to resolve this debate with an answer that would satisfy both parties.
Seems like useless typing to me… and a possible cause for confusion. If you don’t need it, don’t put it!