home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / object / 4163 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  2.0 KB

  1. Path: sparky!uunet!europa.asd.contel.com!emory!ogicse!pdxgate!parsely!percy!data!kend
  2. From: kend@data.rain.com (Ken Dickey)
  3. Newsgroups: comp.object
  4. Subject: Re: objects and closures
  5. Message-ID: <730@data.rain.com>
  6. Date: 5 Nov 92 20:11:29 GMT
  7. Article-I.D.: data.730
  8. References: <1992Oct27.205320.13271@twg.com> <9210302223.AA11001@cs.columbia.edu> <720756315@sheol.UUCP>
  9. Organization: Microtek DSD, Hillsboro, OR
  10. Lines: 34
  11.  
  12. throopw@sheol.UUCP (Wayne Throop) writes:
  13.  
  14. >I think that "objects are a poor being's closures" is true in the same
  15. >sense that "while constructs are a poor being's conditional goto".  The
  16. >closure(goto) is the much more powerful construct when compared to the
  17. >object(while), but that's not the interesting relationship between the
  18. >two.  The *interesting* relationship is that the essentially-syntactic
  19. >sucrose making up the object(while) captures an interesting subcase of
  20. >the closure(goto), which aids software developers in reasoning about a
  21. >program's behavior.
  22.  
  23. >So in one sense it is the poor being who *has* the closure(goto), but
  24. >*lacks* the object(while).
  25.  
  26. I think that you have the relationship inverted.  Having OO only is
  27. like having WHILE, but not IF, DO, CASE, and GOTO.  If you have your
  28. choice of imperative, OO, functional, etc. styles you have a wider
  29. range of solutions to choose from in solving a particular problem.
  30. Yes, you can simulate IF using WHILE, but there are times when IF is
  31. a more natural solution.  OO does not automatically lead to good style
  32. or "reasonable" programs.
  33.  
  34. For that matter, one can use (implement) several different object
  35. models of computation.  It is at times fun and convenient to do so. 
  36.  
  37. Some time ago I heard it argued that checking spelling interactively
  38. was a *bad idea* because it did not fit in well with the Unix pipe
  39. model (sort | uniq | spell).  I think that "OO only and everywhere"
  40. has similar faults.
  41.  
  42.  
  43. -Ken Dickey
  44. P.S.  Yes, I have implemented several object systems using closures.
  45. I have also designed and build a number of industrial software systems.
  46.