[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a pure side effect language

On Thursday, July 3, 2003, at 05:14 PM, Michael Vanier wrote:

>> Date: Thu, 3 Jul 2003 16:49:28 -0700
>> From: James McCartney <asynth@io.com>
>> I don't know if anyone here knows about the MAX application, which is
>> used by musicians (there are other ports known as jMAX and PD). It is 
>> a
>> boxes and wires style visual language where the boxes are objects and
>> the wires represent message sends to the objects. The message sends 
>> are
>> implemented as C function calls passing a list of tagged argument
>> values.
>> The interesting thing about this language is that is probably as far
>> from functional as you can get. It is a pure side effect language. The
>> function calls do not return a value. Therefore it can only do 
>> anything
>> by mutating an object or causing i/o. There are no variables per se,
>> but there are objects in which you can store a value by sending it a
>> message, and get the stored value out by sending a message.
> Of course, even pure functional languages can compute without returning
> values if you use continuation-passing style (CPS).  A standard 
> compiler
> trick for some languages is to convert regular function calls to CPS.  
> You
> also need tail call elimination for this to work.

OK, I see that. MAX uses the C stack and does no longjmp, Cheney on the 
MTA stuff, therefore has no continuations, so it has to cause side 

--- james mccartney