home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / object / 4186 < prev    next >
Encoding:
Text File  |  1992-11-10  |  2.0 KB  |  40 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!munnari.oz.au!metro!usage!syacus!ian
  3. From: ian@syacus.acus.oz.au (Ian Joyner)
  4. Subject: Re: objects and closures
  5. Message-ID: <1992Nov10.115952.24035@syacus.acus.oz.au>
  6. Organization: ACUS Australian Centre for Unisys Software, Sydney
  7. References: <1992Oct27.205320.13271@twg.com> <9210302223.AA11001@cs.columbia.edu>     <720756315@sheol.UUCP> <TMB.92Nov6185629@arolla.idiap.ch>
  8. Date: Tue, 10 Nov 1992 11:59:52 GMT
  9. Lines: 29
  10.  
  11. tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
  12.  
  13. >As "goto" is more expressive than a "while" loop, so are closures more
  14. >expressive than objects.
  15.  
  16. Can you explain what you mean here? The way I understand it (maybe I am
  17. reading your statment wrong) is that you can say that "goto" is more
  18. powerful than a "while" loop, as a goto can transfer control to any
  19. label in scope. Whereas the while loop is very restrictive, as it transfers
  20. control to one specific place in the program.
  21.  
  22. However, goto is not so expressive. Just by itself, all you know is that
  23. control is being transferred somewhere, for some reason. However with the
  24. while you can glean a whole lot more information about what is going on.
  25. You immediately know it is a loop, and therefore repetitive computation.
  26. It is probably also much more expressive as to loop preconditions,
  27. termination, etc, and all those kinds of things that help you reason
  28. about whether a program is correct.
  29.  
  30. Now I don't know how this relates to closures and objects, as this thread
  31. has degenerated into the unhelpful technobabble that so many threads
  32. wind up in. Chris Reade in Elements of Functional Programming does not say
  33. much about closures. Does anyone have a concise and accessible write up
  34. that helps understand the issue of closures?
  35. -- 
  36. Ian Joyner  ACUS (Australian Centre for Unisys Software)    ian@syacus.acus.oz
  37. "Where is the man with all the great directions?...You can't imagine it,
  38.  how hard it is to grow, Can you imagine the order of the universe?" ABWH
  39. Disclaimer:Opinions and comments are personal.
  40.