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,d8a4797a79f9c90f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-26 09:31:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!news-FFM2.ecrc.net!news.cesnet.cz!crax.cesnet.cz!news.felk.cvut.cz!not-for-mail From: "Sergey Koshcheyev" Newsgroups: comp.lang.ada Subject: Re: I/O - exception handling Date: Mon, 26 May 2003 18:25:48 +0200 Organization: Czech Technical University Message-ID: References: NNTP-Posting-Host: r2c113.mistral.cz X-Trace: ns.felk.cvut.cz 1053966342 6526 62.245.66.113 (26 May 2003 16:25:42 GMT) X-Complaints-To: usenet@ns.felk.cvut.cz NNTP-Posting-Date: Mon, 26 May 2003 16:25:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:37796 Date: 2003-05-26T18:25:48+02:00 List-Id: "Hyman Rosen" wrote in message news:lEqAa.18129$fT5.1702@nwrdny01.gnilink.net... > The C++ way is to declare an object with a destructor (Finalize in Ada) > which holds the File_Type and closes it upon destruction. Since this > happens upon block exit, regardless of how that happens, you only have > to have one Close, and of course, once you have such an object, you can > use it everywhere. > > Ada makes it somewhat painful to do this since types with Finalization > have to be declared at library level. Yes, C++ handles this very nicely, that's why I'm trying to find a better Ada way. I myself miss constructors and destructors in Ada a lot. Sergey.