Re: [stack] utility of the retain stack
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Nov 24, 2008, at 9:43 PM, John Meacham wrote: > Is your restriction to second order due to your inference algorithm > or something more fundamental to the internals of your implementation? It was both, but now it's just the latter. Well, that, and certain things are just easier to handle when first class functions aren't involved. > What type system are you currently using? The higher order variant is similar to Cat's in that it uses row variables to represent the stack. It adds intersection types in order to give the language (I believe) principal typings. Here are a couple of examples which might make a rough kind of sense: twice : A [A -> B /\ B -> C] -> C twice = dup dip i m : A [A [B -> C] -> D /\ B -> C] -> D m = dup i > perhaps using this algorithm will allow functions to 'push' the > apppropriate higher order types downward so explicit annotations > arn't needed in general. This is essentially what I'm doing with intersections. Thanks for the suggestions. - John