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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79bbf7e359159d0d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-13 17:08:07 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!152.163.239.130!portc01.blue.aol.com!uunet!dca.uu.net!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: newbie can't get exceptions to work! Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Sat, 14 Apr 2001 00:06:13 GMT References: <9ao1if$cq9$1@taliesin.netcom.net.uk> <3ACFC902.115624A1@mindspring.com> <86u23yszjo.fsf@acm.org> <86wv8sfwec.fsf@acm.org> <86puej8gbu.fsf@acm.org> <3AD4A38D.B418FA6E@gsde.hou.us.ray.com> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:6883 Date: 2001-04-14T00:06:13+00:00 List-Id: "Samuel T. Harris" writes: > 3. Using optional parameters employs a conservation > of declarations. One declaration handle two variations. > Imaging package ada.text_io being specified with > two of every put and get routine because the form > parameter is optional. But it's interesting that Text_IO does have two of every routine -- one for Current_Output, and one where the file is specified explicitly. This is because the file parameter comes first, and the Ada rules do not define optional parameters to be equivalent to all the subprograms with all combinations of having or not-having the parameter. Perhaps it should. > As counter-point to the above benefits of optional > parameters, consider a real problem we experienced. > Using the VADS Ada compiler, we extensively use > the current_exception.exception_name function call. > Migrating to Apex we were pleased to find it defines > just such a call so we did not feel a problem on > this portability issue. That is until I discovered, > through Apex complaining about it, that some of our > code uses a subprogram rename declaration and that > this subprogram rename declaration would not compile > because Rational had added an optional parameter > to current_exception.exception_name. This clearly > shows that a subprogram with an optional parameter > is NOT semantically equivalent to two subprograms, > one with and one without, said parameter. Right. I think it probably should be semantically equivalent, but that leads to a lot of implementation headaches. - Bob