Re: [stack] utility of the retain stack

John Meacham <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Mon, Nov 24, 2008 at 09:11:47PM -0500, John Nowak wrote:
> > and they can be desugared quite strightforwardly to the underlying  
> > concatenative language
> 
> This is only the case in a higher order language (with a sufficiently  
> flexible type system). As it stands now, I'm still working with a  
> second order language, so such a desugaring is unfortunately not  
> possible. Adding lambdas requires extending the semantics.

What type system are you currently using? Is your restriction to second
order due to your inference algorithm or something more fundamental to
the internals of your implementation? Is your intermediate
representation typed? I have been a big fan of the impredicative boxy
types alogorithm for inference

http://research.microsoft.com/~simonpj/papers/boxy/

which can support arbitrary rank polymorphism and is really
straightforward to implement. Since explicit recursive definitions or
definitions at all really are relatively rare in concatenative
languages, perhaps using this algorithm will allow functions to 'push'
the apppropriate higher order types downward so explicit annotations
arn't needed in general. 

        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.