Re: Go ahead. Stop programming. This ensures you from any mistakes.



valentin tihomirov <V_tihomirov@xxxxxxx> wrote:

<snip>

The important case where
switches ARE INDISPENSABLE is jumping to a beginning of code. This is needed
when you mark a start/entry point to your code. For instance, you allocate
resourses 1, 2, 3 and roll back in case of error in reverse order 3, 2, 1 in
case of error starting at the reached stage. This is the fallthrough feature
which makes the switches indispensable.

I've never needed to do that, despite using multiple resources. The
"finally" part of a try/finally or a try/catch/finally statement is the
C# way of handling this.

And they are nothing like 'if' statements in this invaluable
scenario. Sadliy, when this technique is prohibited. It is especially
sad when good features are abandoned in favour of the people who do
not care about program statements execution flow.

Perhaps those people have a different (and IMO better and safer) idiom
in mind, such as "finally".

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.


Loading