home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!vice!bobb
- From: bobb@vice.ICO.TEK.COM (Robert Beauchaine)
- Newsgroups: comp.lang.pascal
- Subject: Re: TP units question
- Message-ID: <10317@vice.ICO.TEK.COM>
- Date: 4 Sep 92 20:02:27 GMT
- References: <1992Sep4.141203.28370@news.columbia.edu| <dmurdoch.123.715622406@mast.queensu.ca|
- Organization: Tektronix, Inc., Beaverton, OR.
- Lines: 32
-
- In article <dmurdoch.123.715622406@mast.queensu.ca| dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:
- |From the point of view of a user, interfacing it can have both positive and
- |negative points. It makes the unit easier to understand if it only
- |interfaces a few routines. I've got a few units that work perfectly with
- |*nothing* interfaced; they're a joy to use, because they're so simple. (They
- |do things like initialization and exit handling.) On the other hand, a
- |simple interface can't be flexible. You may not like the particular high
- |level interface to a library unit; if the low-level interface isn't hidden
- |from you, you can construct your own high level interface in a new unit,
- |without messing up the implementation of the old unit.
- |
-
- This is actually a pretty good argument for encapsulation and
- polymorphism. Create your objects with as simple an interface as
- possible to finish the task. If you find instances where you need
- more power, derive a new object and only change those parts that
- require updating. If done properly, you don't even need to go
- through your code and update all those function calls that in a
- tradition programming paradigm would now be obsolete.
-
- In a neanderthal way, Borland's .TPU files are a primitive stab at
- object oriented programming. A good lesson in OOP design will
- probably make you a better unit writer as well.
-
- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
-
- Bob Beauchaine bobb@vice.ICO.TEK.COM
-
- C: The language that combines the power of assembly language with the
- flexibility of assembly language.
-
- Real friends don't let friends use UNIX.
-