[plt-scheme] [ANN] Heist: a Scheme interpreter in Ruby

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Jul 31 23:28:39 EDT 2009

On Jul 31, Shriram Krishnamurthi wrote:
> 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).

This is actually a nice summary of a significant problem of such
systems.  Back in my "real world hacking" days, we used Lotus Notes
for many things (like an implementation of a bug tracking system).
The thing with programming that thing is that you'd design the
database structure and the forms, and then the programming was all
done by hanging event callbacks as properties of form elements.

And now coms the obvious fun part -- if there's a bug, not only do you
not have source location of where the bug is, you need to start
sifting through random form elements trying to find where is the
relevant code.  For additional fun, the language was JavaScript-like,
and like any inherently imperative language ("inherent" by culture, at
least), state can come from other random bits.  The result is a true
write-only language.  (Makes that article that was posted recently
about *Scheme* being a write-only language even more ridiculous.)

BTW, I think that many game scripting engines these days suffer from
the same problem.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.