Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jarthur!petunia!kestrel.edu!gyro From: gyro@kestrel.edu (Scott Layson) Newsgroups: comp.object Subject: Re: Closures in C++ Keywords: lambda Message-ID: <1991Mar25.180147.5735@kestrel.edu> Date: 25 Mar 91 18:01:47 GMT References: <4684@m5.COM> <1991Mar24.020701.27641@kestrel.edu> <4687@osc.COM> Reply-To: Gyro@Reasoning.COM Distribution: comp Organization: Kestrel Institute, Palo Alto, CA Lines: 24 In article <4687@osc.COM> jgk@osc.COM (Joe Keane) writes: >In article <1991Mar24.020701.27641@kestrel.edu> gyro@kestrel.edu (Scott >Layson) writes: >>Therefore an instance, to me, is not exactly the same thing as a >>closure, but they are very closely related: a closure can do only one >>thing, while an instance can do any of several things depending on >>which operation is invoked on it. > >But when someone says `an object is a closure', it's understood that the >operation to be performed on the object is the first argument to the closure. >So there's really no difference at all if you take this view. That's true. But I don't take that view. I prefer to think of operation dispatch as happening outside the object rather than inside it. Why? Only because some, though certainly not all, object-oriented languages take the same view (C++, for instance [sorry]). I will grant that this is solely a matter of convention, but it's a convention that is often useful and therefore I adhere to it. -- Scott Layson Burson Gyro@Reasoning.COM