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