"Andrej Mitrovic" <[email protected]> wrote in message news:[email protected]... > On 6/1/11, Andrei Alexandrescu <[email protected]> wrote: >> Also, I think the runtime error on not handling all cases should be >> eliminated as well. It's very non-D-ish and error prone in the extreme >> (as unhandled cases tend to be often rare too). Right there with the >> HiddenFunc error. >> > I get these errors all the time in GUI apps. They're a pain in the > ass, and I really want them to surface during compilation instead of > getting triggered at random during runtime.
Shouldn't final switch be the way to handle this though? It seems like making it a compile time error will just force the programmer to insert 'default: assert(0);', which is basically what the compiler does anyway. Or have I missed the point?
