[Submission] D Slices

Daniel Murphy yebblies at nospamgmail.com
Wed Jun 1 08:26:47 PDT 2011


"Andrej Mitrovic" <andrej.mitrovich at gmail.com> wrote in message 
news:mailman.517.1306925428.14074.digitalmars-d at puremagic.com...
> On 6/1/11, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> 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? 




More information about the Digitalmars-d mailing list