[plt-scheme] [ANN] Heist: a Scheme interpreter in Ruby
On Wed, Feb 25, 2009 at 2:23 PM, Raoul Duke<raould at gmail.com> wrote:
> hi,
>
>> Finally, though for a long time I used to think of event-driven
>> programs as being "merely CPS", I have now come to see them as
>> something different -- as what (for lack of a better name) I call
>> "event-style". It's not quite the same thing at all.
>
> i am curious to learn more. (i'm a bit surprised to hear of someone
> seeing them as nigh same. perhaps that's something to do with me doing
> more C/++/#/Java coding than Scheme.) might you describe the salient
> differences you have in mind?
I keep meaning to get around to responding to this at length and never
do. So I'll keep it short.
CPS is merely a transformation technique. It can be applied to any
kind of program. It can certainly be applied to a direct-style
program to create entry points that an event-driven program needs.
But it can be used for other things, too.
Event-driven programs have no "main". They are ONLY a collection of
callbacks. There is no canonical control flow through such a program;
rather, there are innumerable control flows, all in the hands of the
event handler and, ultimately, the external stimuli (user, etc).
That's the high-order bit.
Shriram