home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / pascal / 6645 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.6 KB  |  34 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!utcsri!torn!news.ccs.queensu.ca!slip204.telnet1.QueensU.CA!dmurdoch
  3. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  4. Subject: Re: TP7 improved encapsulation?
  5. Message-ID: <dmurdoch.167.721969739@mast.queensu.ca>
  6. Lines: 22
  7. Sender: news@knot.ccs.queensu.ca (Netnews control)
  8. Organization: Queen's University
  9. References: <jeremy.721961322@scorpion.ac.cowan.edu.au>
  10. Date: Tue, 17 Nov 1992 03:09:00 GMT
  11.  
  12. In article <jeremy.721961322@scorpion.ac.cowan.edu.au> j.laidman@cowan.edu.au (Jeremy Laidman) writes:
  13. >TP6 introduced object encapsulation with the PRIVATE keyword.  The problem
  14. >is that it only hides the details to the unit level.  Can anyone who's seen
  15. >TP7 tell me if that has been tightened to the object level?
  16.  
  17. No, it hasn't.  There aren't many changes to objects.  There are now dynamic 
  18. methods (as in TPW; no real difference to the language, but you trade off 
  19. slower calls for less data segment space wasted in the method table), and 
  20. you can switch back and forth from private to public within a single 
  21. declaration.
  22.  
  23. >Actually, the ideal would be to have a PUBLIC keyword, where by default all
  24. >attributes are hidden within the unit, and only accessible via method calls.
  25. >One would be able to override this with a PUBLIC section.  This would make for
  26. >a more object oriented language.  Any comments?
  27.  
  28. I don't see the point:  now you can declare your objects to act that way 
  29. by declaring all fields after "private", so why clutter up the language just 
  30. to save one word per object type declaration?
  31.  
  32. Duncan Murdoch
  33. dmurdoch@mast.queensu.ca
  34.