Adding finally to switch

Jesse Phillips jessekphillips at gmail.com
Mon Mar 31 20:56:43 PDT 2008


I haven't given it much thought, but I figured I'd let some other people 
look at it too.

Switch statements are nice, many people hate having to use break; all the 
time, but I don't and am not interest in the debate. What I think is 
missing from a switch statement is a finally section. Most of the time I 
don't have a use for the fall-through feature of switch, but I do have a 
use for doing one or more things that are the same in every case.

As I haven't given it a lot of thought I will leave out some constraint 
ideas, and just see other peoples thoughts. I don't think it would ruin 
compatibility of any sort (backwards or C).



More information about the Digitalmars-d mailing list