<div dir="ltr">On Thu, Nov 6, 2014 at 1:17 AM, Jonathan Marler via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
One thing I like about your suggestion is you can specify if a function's error code should be verified to be handled at compile time.  It would be nice as a library writer if you could specify that the error MUST be handled by the caller.  That way you have some protection that users will use your functions correctly.<br>
<br></blockquote><div><br></div><div>This is why checked exceptions were invented.</div><div><br></div><div>Personally I prefer exceptions over error codes, as any sufficiently advanced use of error codes will start to resemble exceptions anyway... But whichever, there is still the need to enforce that an error case/exception is actually handled (or explicitly not).</div><div><br></div><div>I'd really like a language-enforced way to do this.  Don't have any better suggestion than checked exceptions though...</div><div> </div></div>