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

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Mar 6, 2009, at 9:13 PM, Christopher Diggins wrote:

>> Let me clarify: Quotation is just a higher order function. When you
>> apply it to a function, you get a new function. This is a very simple
>> and straightforward operation.
>
> You don't apply quotation to a function. You quote a term (i.e. an
> expression). This creates a new term. When a quoted term is evaluated
> it creates a function.

There's no reason you have to view it that way. Viewing it as a simple  
function gives you a few clear way of understanding its semantics.

> A higher-order function takes a function as input and/or returns a  
> function as output at run-time.

I never was taught in math class that functions only get run at run- 
time. You're talking about an implementation detail. If you have a  
higher order function applied to a constant argument, you can reduce  
it whenever you like.

> The only difference between lambda abstractions and quotations is  
> that lambda abstractions allow (but do not require) the usage of  
> named variables.

Lambda abstractions *do* require the usage of named variables. That's  
what lambda does -- introduce variables. You seem to be confusing  
lambda calculus with Lisp.

Lambda is not a function. Quotation, on the other hand, is  
understandable as a function. This is very much a good thing and not  
something to be lost or confused by equating it with lambda. What  
quotation does is *much* simpler than what lambda does.

> In a quotation, there is always exactly one implied variable, a  
> stack (at least in Joy and Cat).

That's not an implied variable. I'm not even sure what an "implied  
variable" would be. There's either a variable present that is  
eliminated via substitution as part of an application or there isn't.  
It's true that you can express the semantics of a function in a  
concatenative language using lambda calculus, but that's just  
equivalent to saying that lambda calculus is turing complete.

Quotation does not introduce any variables, "implied" or otherwise.

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