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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,820de86ed0dafb8a X-Google-Attributes: gid103376,public From: Florian Weimer Subject: Re: Help Me Please :) Date: 2000/03/20 Message-ID: <87k8iy9kyb.fsf@deneb.cygnus.argh.org>#1/1 X-Deja-AN: 599952106 References: <89rlvr$gn9$1@nntp3.atl.mindspring.net> Mail-Copies-To: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.argh.org X-Trace: deneb.cygnus.argh.org 953536172 3970 192.168.1.2 (20 Mar 2000 07:09:32 GMT) Organization: Penguin on board User-Agent: Gnus/5.0804 (Gnus v5.8.4) Emacs/20.6 Mime-Version: 1.0 Reply-To: Florian Weimer NNTP-Posting-Date: 20 Mar 2000 07:09:32 GMT Newsgroups: comp.lang.ada Date: 2000-03-20T07:09:32+00:00 List-Id: Robert A Duff writes: > Richard D Riehle writes: > > > In some languages, exceptions are first class objects. Ada exceptions are > > not first class objects for very good reasons. > ^^^^^^^^^^^^^^^^^ > > I beg to differ. I think this is one of the few cases where those other > languages got it right, and Ada got it wrong. Yes, that's my impression as well. Although the Ada approach makes it much easier to write general purpose exception handlers (which only log unexpected exceptions), some things are quite difficult to handle. For example, look at the POSIX.5 binding. There's a single POSIX_Error exception and a task-specific variable to tell one kind of error from the other. The other possibility would have been to use one exception per error, but this would make exception handlers very elaborated (they would have to handle quite a lot of them). I wish I could create a hierarchy of exceptions in Ada (so that, for example, handling POSIX_Error catches Broken_Pipe_Error, too)...