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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98c463a9e98cfdf5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-13 11:06:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!spool0901.news.uu.net!spool0900.news.uu.net!reader0901.news.uu.net!not-for-mail Message-ID: <3D08DF3F.5080800@mail.com> Date: Thu, 13 Jun 2002 14:06:55 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada exceptions. unchecked? References: <8db3d6c8.0206112300.3965a62b@posting.google.com> <3D0750F1.7A12342@raytheon.com> <$4ctS45vG2pB@eisner.encompasserve.org> <3D0771D3.FFEA1AA4@san.rr.com> <3D08ADF9.7040104@mail.com> <3D08CB6F.D68F18DE@san.rr.com> <3D08D2AA.1020502@mail.com> <3D08DAFC.D6BB2ECC@san.rr.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Cache-Post-Path: master.nyc.kbcfp.com!unknown@mosquito.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1023991577 reader1.ash.ops.us.uu.net 20158 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:25898 Date: 2002-06-13T14:06:55-04:00 List-Id: Darren New wrote: > Because it prevents the programmer from ignoring the problem. Note, I didn't > say it prevents the *program* from ignoring it, but the *programmer*. > > That is, with checked exceptions, you can't call malloc() without checking > the result, even if every single time you test the program, you manage to > allocate enough memory. Are we talking about the same thing here? The whole point of exceptions is exactly to call malloc without checking the result. With exception-based error handling, code is written as if errors never happen, and resource allocation is done with objects which release the resource when their lifetime ends. Then if an error does happen, the exception propogates out to a handler which usually deals with the situation in a high-level fashion, and allocated resources between the point of the exception and the handler are cleaned up.