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-Thread: 103376,999932ecc319322a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!in.100proofnews.com!in.100proofnews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: advice on package design Date: 21 Mar 2005 11:19:55 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1110212638.336123.298580@l41g2000cwc.googlegroups.com> <1gbk0qx2sgzpg$.sltzfssofla8$.dlg@40tude.net> <3jok3ghqqls8$.1rrsonb8jsurt$.dlg@40tude.net> <88zllqj1min5$.fqqxis9i327d$.dlg@40tude.net> <18e9a92kz25wu$.8b965bel5vef$.dlg@40tude.net> <1dgodaruwhhwo$.1baazg490isjx.dlg@40tude.net> <423a9fc2$1_1@glkas0286.greenlnk.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1111421995 7937 192.74.137.71 (21 Mar 2005 16:19:55 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 21 Mar 2005 16:19:55 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:9680 Date: 2005-03-21T11:19:55-05:00 List-Id: "Martin Dowie" writes: > Robert A Duff wrote: > >> I've never understood why this needs to be this way... > > > > Because I2 is visible in the handler. But it's declaration is never > > successfully elaborated, so it does not exist! > > > > procedure P is > > X: Integer := F(...); -- raises Some_Error > > Y: Integer := 123; > > begin > > ... > > exception > > when Some_Error => > > Put(X); Put(Y); -- What are the values of X and Y here? > > end P; > > And we couldn't have come up with some form of words to get > round that?!?!?!?! :-) It's not a wording issue. It just doesn't make any sense to allow code to refer to variables that do not exist. What's needed is a syntax that better reflects the semantics. It was a mistake in Ada 83 to attach handlers to scope-y things. - Bob