comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@mitre-bedford.arpa  (Robert I. Eachus)
Subject: Re: Language lawyer needed
Date: 8 Apr 93 18:10:45 GMT	[thread overview]
Message-ID: <EACHUS.93Apr8131045@dr_no.mitre.org> (raw)

In article <1993Apr7.183449.21551@sei.cmu.edu> dlehman@ajpo.sei.cmu.edu (Danfor
d Lehman) writes:


   Dan says:

  > NOT (which flip-flops the "false" asserted above, of course).  Indeed, I'll
  > argue that at the (precise) point of 'x' in "Q(x=>0);", the variable "x"
  > declaration is not visible at all (and thus that 8.3(14) ought to read

	>  A declaration is directly visible within a certain part
	>  of its immediate scope [which] extends to the end of the
	>  immediate scope of the declaration, but excludes places where the
	>  declaration is hidden as explained below or where visibility is
	>  determined by selection as explained above. ~~~~~~~~~~~~~~~~~~~
	   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    But you don't need to modify that sentence, just include the
(misleadingly worded) previous sentence: "Where it is not visible by
selection, a visible declaration is said to be directly visible..."
As I said before perfectly correct, but misleading.  Paragraphs
8.3(6-13) have dealt with the case where visiblity is by selection,
8.3(14-16) deals with direct visibility.  The first sentence defines
directly visible to be visibile, but not visible by selection. 8.3(6)
says that at certain places, the only things that are visible are
thoses visible by selection.

  >     If you hold that variable declaration "x" is visible at all,
-- It isn't.
  > and obviously formal parameter specification "x" is also,
-- the same.
  > don't you then contradict/conflict with 8.3(4), which allows more
  > than one meaning if and only if the identifier is acceptable
  > according to overloading rules (which don't apply in this case)?
  > Curious readers of 8.3 want to know, too!  (This is the reason for
  > the tilde underscored revision to 8.3 above.  Maybe 8.3(6) intends
  > to say this, that only one type of visibility is available at any
  > given point;

  It does.  If it didn't then the P's in P.P.P.P.P could all refer to
the same declaration.  (It is possible, but it is a pathological case:

 package Q is package P renames Q; end P;
 with Q; use Q; procedure P is pacakge R renames P.P.P.P.P;...
 
 see AI-187)

  > I read it to say rather/simply that there are two types of
  > visibility (and maybe at point P each can be applied and yield
  > ambiguity (in "package P is A : integer := 0; B : integer := P.A;
  > ... " this last A refers to the same decl. by either type of
  > visibility, and is thus not ambiguous)!?)

  You read it wrong, if I use your reading the following would be legal:

  with Text_IO;
  package C is
    A: Integer;
    B: Integer := Text_IO.A; -- legal? Of course not!
  end C;

  If the preceding A was directly visible at the point following
"Text_IO.", this would be a very different--and much more
confusing--language.  So, where visibility by selection applies,
NOTHING is directly visible.



--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...

             reply	other threads:[~1993-04-08 18:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-08 18:10 Robert I. Eachus [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-09 22:33 Language lawyer needed cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n
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