Friday, May 23, 2003

Nameless

Here's a half-baked proposal for a programming language feature. Start with a regular structured language, and then remove the ability to refer to any other modules. Modules -- whatever modules look like, I'm not quite sure yet -- can communicate with other modules through two primitives: emit and accept. Emit and accept are functionally equivalent to sending and receiving messages, but they are not addressed to (or from) specific entitites. They only, like cells (and the biological inspiration becomes clear) put various siglals out into the environment and fish things back out of it.

Now, a better refinement is to somehow specify the "shape" of the messages, so as to restrict what you're willing to accept. After all, you don't want to accept every output that every other module is producing. So perhaps the primitive would be used in something like "accept(text)" or even "accept(sorted text)." This begins to sound a little bit like Linda-style tuples (implemented in Java as JavaSpaces).

The idea is to get something a little bit like Unix pipes, something so incredibly low-to-the-ground that anything can implement it, and is so general that you can hook up dozens of applications to produce a really powerful processing. This would improve on pipes in two ways: it would be networked, not just a linear sequence, and it would be automatic, as producers and consumers of various properties of data are coordinated by the fact of their matching emit and accept statements.