Re: [stack] utility of the retain stack

John Meacham <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Sun, Nov 23, 2008 at 11:43:18AM -0800, William Tanksley, Jr wrote:
> John Nowak <[email protected]> wrote:
> > (I've recently
> > been able to extend the intersection-based type system to a higher
> > order language, so this second-order restriction may not last anyway.)
> 
> Even a fan of lower-order logic like myself can applaud this result. Good luck!
> 
> > The solution seems to be to introduce a retain stack a la Forth (and
> > Factor). Here, we indicate the value of the retain stack by placing it
> > to the right of the dot. '+r' copies the top element of the retain
> > stack to the data stack:
> 
> Interestingly, Factor just eliminated its retain stack words. This
> makes sense for them, since they've always been higher-order.

Wouldn't a retain stack only give one just one order more expressive
power? as in, you have second order, and a psuedo third order (with a
different semantics/syntax) due to retain stack use. Sort of like axiom
schemas allow you to express some things that would normally require
second order logic in first order logic, but they are just shy of
actually being second order constructs. The value of retain stacks seems
dubious to me in this case. 

explicit lambda forms seem to take care of all the cases that I have
seen retain stacks used, and they can be desugared quite
strightforwardly to the underlying concatenative language and don't
muddy the run-time semantics as they are simply a source -> source
transformation.

        John

-- 
John Meacham - ⑆repetae.net⑆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.