Originally Posted by
C_ntua
I believe the only reasonable argument here, as shown in my example, is when the code forces the program to die with a function. The language can understand if you have a return statement, but has no idea what a function does.
But think that it would be kind of troublesome to "fix" the above. In my example, maybe Application.Exit() can fail and not terminate the program.
The real question here is this "Should it be a warning or an error?"
99% of the times, using unassigned variables in unacceptable. So what would you have done? Make it a simple warning?
I get the feeling of the question, been there myself, but always ask "what else could have been done?".