Re: [stack] What does "concatenative" actually mean?

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Mar 3, 2009, at 10:11 AM, William Tanksley wrote:

> Factor's official object system is definitely fully concatenative. It
> won't matter who you ask; if they disagree with me, they're wrong. ;-)
>
> Technical point: Referential Transparency in a concatenative  
> language is
> different from the same concept in an applicative language. In one
> sense, it's harder to use, since you can't simply move words from one
> place to another (without rearranging the stack); in another sense  
> it's
> easier to use, since you can "factor out" a word without having to do
> any work at all (cut and paste is sufficient). Unlike applicative
> languages, you do NOT have to worry about functional state; the fact
> that the stack acts as a monad means that the state is already
> preserved; even I/O can be modelled properly.

Not everyone agrees on this point. Take a look at this thread:

    http://lambda-the-ultimate.org/node/3050

Many would say Joy is not purely functional and that the "monadic  
stack" argument essentially amounts to hand-waving. If you take this  
view, then the question of Joy or Factor being "purely concatenative"  
depends on if you require concatenative languages to be "purely  
functional".

Joy isn't "pure enough" to allow evaluation via postfix term rewriting  
in an arbitrary order. If you had a type system that could enforce  
something similar to the I/O monad in Haskell, it would be. I  
definitely think there's some use in distinguishing between the  
relative purity of both approaches.

I feel that being able to evaluate in any order without worrying about  
side effects is somehow "more concatenative" than having to evaluate  
left to right. Rather than make a claim here, I tried to sidestep the  
issue to avoid contention. I see I failed once again! :)

- John
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.