home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / ada / 4117 < prev    next >
Encoding:
Text File  |  1993-01-29  |  1.6 KB  |  38 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!spool.mu.edu!yale.edu!newsserver.jvnc.net!gmd.de!Germany.EU.net!mcsun!sunic!news.lth.se!paster
  3. From: paster@dna.lth.se (Christian S. Collberg)
  4. Subject: Re: private types and recompilation
  5. Message-ID: <1993Jan28.080743.29006@lth.se>
  6. Sender: news@lth.se
  7. Organization: Department of Computer Science, Lund University
  8. References: <7277@grus.cs.nps.navy.mil> <9301271722.aa25516@Paris.ics.uci.edu>
  9. Date: Thu, 28 Jan 1993 08:07:43 GMT
  10. Lines: 26
  11.  
  12. In article <9301271722.aa25516@Paris.ics.uci.edu> kanderso@mabillon.ICS.UCI.EDU (Kenneth Anderson) writes:
  13. >In comp.lang.ada you write:
  14. >
  15. >>When Ada 83 was designed, why did the designers choose to put
  16. >>the details of private types in package specifications, rather than
  17. >>in package bodies (which is more in the spirit of information hiding, and
  18. >>better supports independent compilation).
  19. >
  20. >I'm not sure, but I think because the compiler needs to know the size
  21.                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  22. >of the types so that it can allocate space for parameters in the
  23. ^^^^^^^^^^^^^
  24. >subprograms that are defined in the spec.
  25. >
  26. >
  27.  
  28.  
  29. Yes, this is correct. See my thesis "Flexible Encapsulation" (Yes, this is a
  30. blatant plug :-)) for a description of an Ada-like language (Zuse) which --
  31. through the use of novel translation techniques -- allows private parts of
  32. hidden types to be hidden within package bodies.
  33.  
  34. Christian
  35. -- 
  36. Christian.Collberg@dna.lth.se
  37. Department of Computer Science, Lund University, BOX 118, S-221 00 LUND, Sweden
  38.