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