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,1e4280c6ade7eb23 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Exception types? Date: 1998/06/09 Message-ID: #1/1 X-Deja-AN: 361069227 References: Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 897411018 29566 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-06-09T00:00:00+00:00 List-Id: On 8 Jun 1998, Matthew Heaney wrote: > Brian Rogoff writes: > > > One of the things that always bothered me about exceptions in Ada > > is that they are not really integrated into the type system, for example, > > they are not part of a generic signature package. I looked through the > > Ada 95 and Ada 83 Rationales to try to find a discussion of this topic, > > but I couldn't find one. Is there some record available? > > Mats Weber pointed this out too, in his PhD thesis. Yes, I read that, and Magnus Kempe's paper on generic signature packages. It is also noticeable to anyone who uses any of the various ML module systems, which are similar to Ada except that exceptions are part of a module signature. > You can work around this feature by importing a package that contains an > exception declaration. This is how Text_IO works, by importing package > IO_Exceptions. > > ... workaround snipped ... It isn't really a workaround, as you haven't really parameterized the package by an exception, and you can't pass that package as a generic formal package parameter. Mats workaround involved passing a success/failure function (an exception "wrapper"), which is a little better in the particular case I'm interested in. There are a few workarounds which involve "programmer discipline" but I was wondering what the thinking was behind not having typed exceptions to begin with in Ada 83. I imagine the reason for not having them in Ada 95 could be upward compatibility. I suppose this "feature" of the language will discourage the use of exceptions in control flow, which will greatly please the Eiffel fanat^H^H^H^H^H advocates among us. -- Brian