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

  1. Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb
  2. From: tmb@arolla.idiap.ch (Thomas M. Breuel)
  3. Newsgroups: comp.object
  4. Subject: Re: objects and closures
  5. Followup-To: comp.object
  6. Date: 6 Nov 92 18:56:29
  7. Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
  8.     Perceptive)
  9. Lines: 31
  10. Message-ID: <TMB.92Nov6185629@arolla.idiap.ch>
  11. References: <1992Oct27.205320.13271@twg.com> <9210302223.AA11001@cs.columbia.edu>
  12.     <720756315@sheol.UUCP>
  13. Reply-To: tmb@idiap.ch
  14. NNTP-Posting-Host: arolla.idiap.ch
  15. In-reply-to: throopw@sheol.UUCP's message of 2 Nov 92 23:10:08 GMT
  16.  
  17. In article <720756315@sheol.UUCP> throopw@sheol.UUCP (Wayne Throop) writes:
  18.  
  19.    I think that "objects are a poor being's closures" is true in the same
  20.    sense that "while constructs are a poor being's conditional goto".  The
  21.    closure(goto) is the much more powerful construct when compared to the
  22.    object(while), but that's not the interesting relationship between the
  23.    two.  The *interesting* relationship is that the essentially-syntactic
  24.    sucrose making up the object(while) captures an interesting subcase of
  25.    the closure(goto), which aids software developers in reasoning about a
  26.    program's behavior.
  27.  
  28. In article <Bx5DFt.7z3@dcs.ed.ac.uk> pdc@dcs.ed.ac.uk (Paul Crowley) writes:
  29.  
  30.    I think this is an excellent and thought-provoking analogy.  Objects
  31.    are closures you can keep track of in your head.  This is why I'm not
  32.    clear why you'd want ML-style closures and higher-orderness in an
  33.    object oriented language; it seems contrary to the style of OO
  34.    programming.  
  35.  
  36. As "goto" is more expressive than a "while" loop, so are closures more
  37. expressive than objects.
  38.  
  39. However, I think this is where the analogy ends. Unlike most uses of
  40. "goto", data abstraction with closures is a clean and clear
  41. programming technique.
  42.  
  43. I find abstraction and software reuse in terms of closures more
  44. convenient and useful than abstraction and software reuse in terms of
  45. objects, and I'd much rather have closures than objects.
  46.  
  47.                     Thomas.
  48.