Re: Closures versus objects

"Joe Marshall" <[email protected]>
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
On 2/15/07, Robbert Haarman <[email protected]> wrote:
> On Thu, Feb 15, 2007 at 11:13:36AM -0800, Mike Newhall wrote:
> >       As a perhaps separate thought, what are closures useful for?
>
> Well, really, for passing to higher order functions. Someone already
> mentioned mapcar, but I would like to make specific mention of
> callbacks, as well.

Callbacks are a particular case of continuation-passing-style.  While
one doesn't
usually chain callbacks within callbacks within callbacks, there is no reason
that one couldn't (although in a language with a crappy type system it becomes
unweildy really quick).

-- 
~jrm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.