home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!lunic!my!sm-emac15.sm.luth.se!matti
- From: matti@my.sm.luth.se (Matti Larborn)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Think Pascal - Whats... - data abstraction?
- Message-ID: <1351@my.sm.luth.se>
- Date: 17 Nov 92 14:01:15 GMT
- References: <6746@m1.cs.man.ac.uk>
- Sender: news@sm.luth.se
- Organization: Lule} University
- Lines: 36
- X-UserAgent: Nuntius v1.1.1d11
- X-XXMessage-ID: <A72EB9B97F01037B@sm-emac15.sm.luth.se>
- X-XXDate: Tue, 17 Nov 92 14:01:13 GMT
-
- In article <6746@m1.cs.man.ac.uk> Julian Fletcher, writes:
- >Think pascal seems to have fallen by the wayside in comparison with
- think C.
- >
- >1 Are there any further upgrades since 4.0.1 ?
- > If so, where can they be obtained from, and what are the improvements ?
- >
- >2 Does anybody have any idea of the future of this wonderful product
- > i.e. is Symantec really committed to it ?
-
- Another question: Why don't Think Pascal support abstract datatypes?
-
- The only thing they would have to add is an export declaration:
-
- x=object
- export a,b; { or name it public if you like }
- a: integer;
- b: real;
- c: char; { hidden }
-
- {?operations }
- end;
-
-
- There are also better ways to do this, but if you cannot hide fields in
- objects you cannot make abstract datatypes. One main idea with objects is
- to hide the data in the object so that the user cannot manipulate it
- unless he/she uses the supplied operations. In this way you get code that
- is easier to modify (since other parts of the program doesn't know
- anything about your implementation) and you also get secure programs. If
- one uses the built in operations one cannot do anything wrong (unless the
- operations have some errors in them).
-
- Symantec: Please add some kind of export feature to Think Pascal...
-
- --Matti Larborn, Sweden
-