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.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: "James S. Rogers" Subject: Re: Help Me Please :) Date: 2000/03/18 Message-ID: #1/1 X-Deja-AN: 599020194 References: <89rlvr$gn9$1@nntp3.atl.mindspring.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 953348660 12.74.128.70 (Sat, 18 Mar 2000 03:04:20 GMT) Organization: AT&T Worldnet NNTP-Posting-Date: Sat, 18 Mar 2000 03:04:20 GMT Newsgroups: comp.lang.ada Date: 2000-03-18T00:00:00+00:00 List-Id: Robert A Duff wrote in message ... >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. Have you ever used exceptions in C++? Very few people do. The problem arises from the fact that exceptions are first class objects. In C++ you cannot "catch" an exception without knowing its type. This means that you must have exquisite coupling with all your dependent compilation units to use exceptions reliably. This coupling requirement works strongly against encapsulation and modularity. The only way around this is to declare a single exception type for all exceptions generated by an application. This leaves you in the same position as you are in Ada. Of course, the problem with this solution for C++ is that you will probably use class libraries, which, if they use exceptions at all, will probably not conform to the exception class chosen by your team. If this is the case, then you are in a much worse situation than if you used Ada. Jim Rogers Colorado Springs, Colorado