home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / ada / 3818 < prev    next >
Encoding:
Text File  |  1992-12-24  |  2.0 KB  |  50 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!linus!linus.mitre.org!linus!mbunix!eachus
  3. From: eachus@oddjob.mitre.org (Robert I. Eachus)
  4. Subject: Re: Visibility
  5. In-Reply-To: pattis@cs.washington.edu's message of Thu, 24 Dec 92 02:16:55 GMT
  6. Message-ID: <EACHUS.92Dec24160854@oddjob.mitre.org>
  7. Sender: news@linus.mitre.org (News Service)
  8. Nntp-Posting-Host: oddjob.mitre.org
  9. Organization: The Mitre Corp., Bedford, MA.
  10. References: <1992Dec23.233519.21523@netfs.dnd.ca>
  11.     <1992Dec24.021655.22555@beaver.cs.washington.edu>
  12. Date: Thu, 24 Dec 1992 21:08:54 GMT
  13. Lines: 35
  14.  
  15. In article <1992Dec24.021655.22555@beaver.cs.washington.edu> pattis@cs.washington.edu (Richard Pattis) writes:
  16.  
  17.    Now, can anyone say why this interpretation "is a good thing".
  18.  
  19.    Sure.  First of all the restriction in 8.2(16) only applies to the
  20. use of a name within a subprogram with the same simple name.  The rule
  21. is there so that there is no need to do (potentially circular)
  22. overload resolution of a name which may be affected by the current
  23. declaration before the parameter and result type profile of the
  24. declaration itself can be resolved.  Second any simple name which
  25. which matches would be illegal for other reasons, so the only
  26. "overgenerality" that the rule could be accused of is in exactly this
  27. case.  But--you still need to do (potentially circular) overload
  28. resolution to determine whether or not this name is legal:
  29.  
  30.     procedure P is
  31.       type Q is new Integer;
  32.       function P return Integer is
  33.         function Q return P.Q is...
  34.  
  35.    (Please no responses on the other rules which come into play here.
  36. I know that beacuse of 4.1.3(18), this simple case is alway ambiguous.)
  37.  
  38.    So the intent of the rule is to allow an implementation not to put
  39. function Q into the overload resolution database until the whole
  40. declaration is resolved, and the minimum restriction possible is as
  41. written.
  42.  
  43. --
  44.  
  45.                     Robert I. Eachus
  46.  
  47. with Standard_Disclaimer;
  48. use  Standard_Disclaimer;
  49. function Message (Text: in Clever_Ideas) return Better_Ideas is...
  50.