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

  1. Path: sparky!uunet!noc.near.net!hri.com!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. Message-ID: <TMB.92Nov11120914@arolla.idiap.ch>
  6. Date: 11 Nov 92 17:09:14 GMT
  7. References: <1992Oct27.205320.13271@twg.com> <9210302223.AA11001@cs.columbia.edu>
  8.     <720756315@sheol.UUCP> <TMB.92Nov6185629@arolla.idiap.ch>
  9.     <1992Nov10.115952.24035@syacus.acus.oz.au>
  10. Reply-To: tmb@idiap.ch
  11. Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
  12.     Perceptive)
  13. Lines: 28
  14. NNTP-Posting-Host: arolla.idiap.ch
  15. In-reply-to: ian@syacus.acus.oz.au's message of Tue, 10 Nov 1992 11:59:52 GMT
  16.  
  17. In article <1992Nov10.115952.24035@syacus.acus.oz.au> ian@syacus.acus.oz.au (Ian Joyner) writes:
  18.  
  19.    tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
  20.  
  21.    >As "goto" is more expressive than a "while" loop, so are closures more
  22.    >expressive than objects.
  23.  
  24.    Can you explain what you mean here? The way I understand it (maybe I am
  25.    reading your statment wrong) is that you can say that "goto" is more
  26.    powerful than a "while" loop, as a goto can transfer control to any
  27.    label in scope. Whereas the while loop is very restrictive, as it transfers
  28.    control to one specific place in the program.
  29.  
  30. By "expressive" I mean that I can "express more concepts with it"; I
  31. think that's the obvious and usual meaning of the term.
  32.  
  33. "goto" not only lets me build while loops, but I also can build loop
  34. exits and local exception handling out of it. A more powerful form of
  35. "goto", namely "callcc", lets me build exception handling and
  36. nondeterministic choice facilities with backtracking (incidentally
  37. "callcc" requires closures).
  38.  
  39. "closures" are more expressive than objects because not only can I use
  40. them to build objects, opaque, and abstract datatypes out of them, I
  41. can also use them for building control structures ("while", "for",
  42. "map", "reduce", "fold", etc.) and for building lazy data structures.
  43.  
  44.                     Thomas.
  45.