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,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: gauthier@unilim.fr (Michel Gauthier) Subject: Re: Why no Propagates? Date: 1996/10/18 Message-ID: #1/1 X-Deja-AN: 190439726 references: <325D7F9B.2A8B@gte.net> organization: Universite de Limoges newsgroups: comp.lang.ada Date: 1996-10-18T00:00:00+00:00 List-Id: In article , mheaney@ni.net (Matthew Heaney) wrote: >> In article <326391B6.4B23@gsfc.nasa.gov>, Mike Stark >> wrote: >> >> [...] >> >> The designers of Ada 83 considered including explicitly naming the >> exceptions propagated by a subprogram: >> >> procedure P (X : Integer) propagates A, B, C; >> >> This feature, and the reasons it was rejected, is discussed in section >> 14.5.2 of the Ada 83 Rationale. >> [...] >> Personally, I think it would be a cool feature to have. Let me the >> programmer decide whether I want to incur the code-expansion penalty. (And >> if the procedure tries to propagate something other than what's stated, >> then raise Program_Error.) >> >> To the designers of Ada 95: Was this feature considered for inclusion? Is >> it a candidate for inclusion in Ada 0X? I was not in the Ada9X team, hence I can't give any information about the question itself, but I guess you could reflect about some cases : - Consider a generic power function. It has a "*" parameter which can "propagate X" for an overflow. Consequently, the power function can propagate the same exception, which must be a parameter of the construct. Ada95 can do this, of course, but it is rather complex. - Consider a generic iterator. You reach the same problem, but complicated by the fact that the iterator can raise exceptions by itself (for example Device_Error if you scan a file). - Consider some use of "exception identities" in order to transmit an exception through rendezvous, and more generally any use of an exception identity variable. Then you need to make"propagate the exception identified by V at some moment of the execution" explicit . How will you write this ? I fully agree that " it would be a cool feature to have", but I concluded long ago that it would be very difficult to make it compatible with all the other features of the language. Possibly an additional effort on ANNotated Ada in this direction would have been useful, but we cannot hope a full solution. ---------- ---------- ---------- ---------- Michel Gauthier / Laboratoire d'informatique 123 avenue Albert Thomas / F-87060 Limoges telephone +33 () 55457335 [or ~ 7232] a partir du 19 octobre, depuis la France : 05 55 45 73 35 from october,19 on, and from abroad : +33 5 55 45 73 35 fax +33 () 55457315 [or ~7201] and similar evolution ---------- ---------- ---------- ---------- Si l'an 2000 est pour vous un mysticisme stupide, utilisez la base 9 If you feel year 2000 a stupid mystic craze, use numeration base 9 ---------- ---------- ---------- ----------