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