There are at least three different patterns employed to make sure a value is always returned; the default case for a switch, throwing an exception for an unknown operation, and yours, with the intermediary value. From a debugging standpoint, I like yours best (though I opted for the default case strategy myself).
Thanks!
There are at least three different patterns employed to make sure a value is always returned; the default case for a switch, throwing an exception for an unknown operation, and yours, with the intermediary value. From a debugging standpoint, I like yours best (though I opted for the default case strategy myself).