home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5201 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  2.0 KB

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