[stack] concatenativity and joy's non-opaque quotations

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
One of the properties of concatenative languages often relayed to me  
is that you can "factor out" portions of code to yield a new  
definition. For example, both versions of 'a' below are equivalent:

    a = b c d e

    f = c d
    a = b f e

However, because Joy's lists are also Joy's anonymous quotations, this  
seems not to be the case. It is impossible to safely perform such a  
factoring unless you know that the quotation will never be inspected  
in such a way that would reveal the difference.

It seems the simple solution would be to separate quotations and lists  
(yielding opaque quotations) and then provide an 'eval' procedure for  
evaluating lists as if they were quotations. Languages like Scheme  
take such an approach.

Have non-opaque quotations proved useful in practice? Are they useful  
in a way that couldn't be easily copied by having both 'i' and 'eval'?

- John

P.S. It seems I've deleted my old visualizations of Joy-like code. I  
may recreate them if I have the time, but I'm less than convinced of  
their utility at the moment.
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.