Re: [stack] Re: Some thoughts on Object Cat

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

> Evaluating (eval (quote (1 2 3))) gives precisely the same result as
> evaluating (1 2 3) - an error. Consider instead (eval (quote (+ 2 3))),
> which yields 5, as expected. In general, evaluating (eval (quote X))
> always gives the same result as evaluating X.

In the top-level lexical environment that is.  Eval does not have access
to the lexical environment from which it is invoked.

I think the confusion arises because Christopher thinks of [foo] as a
function, whereas in Joy it is a list of functions, and only a function
because everything in Joy can be treated as a function.  So the effect
of applying the function [foo] to stack S is that we get S [foo] as the
new stack.  The i function does not apply a function to the rest of
the stack, but evaluates in turn all the functions in the list at the
top of the stack, thus implicitly composing them.

-- 
John Cowan                                [email protected]
I amar prestar aen, han mathon ne nen,    http://www.ccil.org/~cowan
han mathon ne chae, a han noston ne 'wilith.  --Galadriel, LOTR:FOTR
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.