comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n ear.net!inmet!spock!stt@ucbvax.Berkeley.EDU  (Tucker Taft)
Subject: Re: Language lawyer needed
Date: 9 Apr 93 22:33:40 GMT	[thread overview]
Message-ID: <1993Apr9.223340.26114@inmet.camb.inmet.com> (raw)

In article <1993Apr2.193753.22289@inmet.camb.inmet.com> 
 stt@spock.camb.inmet.com (Tucker Taft) writes:

>In article <1993Apr1.215753.3147@oracorp.com> 
>  davidg@oracorp.com (David Guaspari) writes:
>
>>Here's a question for language lawyers.
>
>Oh boy.
>
>>Consider the following pathological program:
>>
>>   procedure Q(x : integer) is  
>>   begin
>>     declare
>>       x : integer;   -- (1)
>>     begin
>>       Q(x => 0);     -- (2)
>>     end;
>>   end Q;
>>
>> . . .
>>  However, the declaration in (1) is not visible by selection at the
>>  point at which x occurs in (2).
>
>This statement is false.  

Oops; I misread David's original sentence -- it is in fact
true.  The declaration in (1) is not visible by selection preceding
the "=>" in (2).  (My misreading had replaced "the declaration in (1)"
with "the first declaration of x".)

The basic confusion illustrated by David's message
comes from the word "hide" which does *not* imply the 
earlier declaration is "invisible" 
but rather simply not *directly* visible (I guess it is 
"indirectly visible" ;-).  

On the other hand, "hide from *all* visibility" does 
mean the declaration is visible neither directly nor by selection.  
This more "obscure" (so to speak) kind of hiding only happens in a 
few cases (within a subprogram specification, and for implicit
declarations overridden by explicit declarations).
It is probably best to just ignore these obscure cases when
trying to build an "intuition" for what the word "hide" means
in Ada.  

(Perhaps a better word for "hide" might be the verb "obscure" ;-)

>>- David Guaspari
>>  davidg@oracorp.com
>
>S. Tucker Taft      stt@inmet.com
>Ada 9X Mapping/Revision Team
>Intermetrics, Inc.
>Cambridge, MA  02138

-S. T. Taft

             reply	other threads:[~1993-04-09 22:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-09 22:33 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-08 18:10 Language lawyer needed Robert I. Eachus
1993-04-07 22:34 agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-s
1993-04-02 16:39 Wes Groleau X7574
1993-04-02 15:39 Mike Berman
1993-04-01 21:57 David Guaspari
1993-04-02 13:57 ` Dave Collard x7468
1993-04-02 16:40 ` Robert I. Eachus
1993-04-02 19:37 ` Tucker Taft
1993-04-02 23:07 ` Rich Messenger
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox