Re: [stack] concatenative lexically-scoped polymorphic mutable variables

John Cowan <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
John Nowak scripsit:

> There are a few restrictions on all this. As already indicated, the  
> language must not allow recursion. (Actually, tail recursion is  
> allowable.) Additionally, the language must not have first class  
> functions as the pseudo-variables cannot be closed over. Finally,  
> special care must be taken for things like callback functions. In  
> particular, the type system must ensure that the function given does  
> not reference any slots meant to be used to emulate lexical scoping.  

What you've done is reinvent Fortran 66, which has exactly this model
and uses a purely static store.  It doesn't even need a stack except
to hold return addresses, and CPS conversion (if it had been known
at the time) could have disposed of that.

So your pseudo-variables can be implemented using plain old global
variables with no problems.

-- 
John Cowan   [email protected]    http://ccil.org/~cowan
I am he that buries his friends alive and drowns them and draws them
alive again from the water. I came from the end of a bag, but no bag
went over me.  I am the friend of bears and the guest of eagles. I am
Ringwinner and Luckwearer; and I am Barrel-rider.  --Bilbo to Smaug
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.