From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps90.POSTED!53ab2750!not-for-mail Sender: blaak@METROID Newsgroups: comp.lang.ada Subject: Re: Exceptions References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <475c6ed8$0$13111$9b4e6d93@newsspool2.arcor-online.net> <1kxk3hlfa25dw$.fl2wvbn0tpbg$.dlg@40tude.net> From: Ray Blaak Message-ID: Organization: The Transcend User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 14 Dec 2007 06:33:00 GMT NNTP-Posting-Host: 154.20.94.243 X-Trace: edtnps90 1197613980 154.20.94.243 (Thu, 13 Dec 2007 23:33:00 MST) NNTP-Posting-Date: Thu, 13 Dec 2007 23:33:00 MST Xref: g2news1.google.com comp.lang.ada:18941 Date: 2007-12-14T06:33:00+00:00 List-Id: "Randy Brukardt" writes: > That was my point; ther language *should not have* unchecked exceptions if > it is going to bother with any checking. Then there is no possibility of > "sneaking through" (modulo compiler or hardware bugs). Yes, you'd have to > declare Storage_Error on (nearly) every routine (and I think that is a good > thing in such an environment). Such a language would require substantial > static analysis at compile-time (but that is practical these days), and > would be a lot closer to the promise of "no bugs if it compiles" (Ada > already gets quite a bit of the way there). > > Still I have to wonder if many people would want to use such a language > (writing code is necessarily harder), and even if they did, if anyone could > stand the language definition effort. Well that's just it. No one would use it since they wouldn't be able to get any work done. They would be spending too much time writing exception declarations and handlers. And for what? What does having Storage_Error declared everywhere buy you? You knew that going in. And how would you handle it? Crash or log it. You can do that in one place at the top level. The vast majority of those forced handlers would be tedious and repetitive, excactly the kind of thing that can be automated, and thus made invisible; in other words, to be turned into unchecked exceptions. Another way to view unchecked exceptions is that they are the language's way of having an implied exception "can raise" contracts declared everywhere. Programming languages are a tool for *people* to instruct computers what to do, not the other way round. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.