Xref: utzoo comp.object:540 comp.lang.c++:5722 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!think!think.com!barmar From: barmar@think.com Newsgroups: comp.object,comp.lang.c++ Subject: Re: Continuations Message-ID: <31844@news.Think.COM> Date: 30 Nov 89 23:58:33 GMT References: <2664@bingvaxu.cc.binghamton.edu> <9624@pyr.gatech.EDU> <1623@odin.SGI.COM> <1989Nov28.183816.15252@odi.com> <9964@june.cs.washington.edu> <1989Nov29.225826.19483@odi.com> <10008@june.cs.washington.edu> Sender: news@Think.COM Followup-To: comp.object Organization: Thinking Machines Corporation, Cambridge MA Lines: 19 In article <10008@june.cs.washington.edu> peterd@june.cs.washington.edu (Peter C. Damron) writes: > Now, if you add continuations, >there is the potential to pass the continuation outside of the object, thus >creating another entry point into the object that is not a member function. >I see this as an information hiding problem for continuations in OO languages. >Perhaps you can relate why this is not a problem in CLOS. CLOS makes no attempt to implement information hiding. (slot-value ) may be called from anywhere, not just methods. In CLOS, methods are just functions that know what the types of their required arguments are, and they are invoked through generic function dispatching. Lisp, in general, doesn't restrict the programmer's options for philosophical reasons. If the programmer wants to pass a lexical closure out of a method, that's his prerogative. Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar Brought to you by Super Global Mega Corp .com