Re: [stack] Properties of Concatenative langauges and Forth

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Jan 2, 2009, at 11:57 PM, Christopher Diggins wrote:

> On Fri, Jan 2, 2009 at 10:20 PM, John Cowan <[email protected]> wrote:
>
>> Christopher Diggins scripsit:
>>
>>> Talking about data-flow in the context of Joy is incorrect. A Joy
>>> program has no data, only functions. You'll see what I mean below.
>>
>> Well, sort of. 5 is a number in Joy, even if it's a function too.
>> As a function, it can be applied to the stack; but if it's on the  
>> stack,
>
> As a syntactic phrase in the Joy language, the symbol "5" has one
> meaning: it is a function that takes a stack as input and returns a
> copy of the input stack, with a value "5" on top.

I agree.

> Dually we can explain it is an instruction that pushes a value "5"
> on a shared stack.

Not necessarily in Joy, unless you also describe 'infra' as something  
which changes which stack is the "shared" stack until some particular  
quotation in finished being evaluated. I think that's pretty clumsy  
compared to '{S} [F] infra => {S F}'.

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