Re: [stack] stackless fixed-arity concatenative languages
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On May 22, 2008, at 10:27 AM, William Tanksley, Jr wrote: > That's what I meant by asking whether the problem was fundamental > -- it appears that it wasn't; our problem was due to a foggy > specification of bi@ that caused us to accept an incorrect > implementation. Well, to be clear, Cat and Fifth can't infer a good type for the correct version either. You end up with 'A b b (A b -> A) -> A'. It's the same general problem where the first application gets in the way of the second. This is directly related to the fact that you're doing all your computation on a single stack and the second application (in this case) is allowed access to the entire state of the program at the limit. This is what I meant by it being a fundamental problem for a system like Fifth's when n-ary combinators are involved. With the newer (and not yet fully implemented) system, you can infer a good type with the clearer specification, but only because the type '$a [$B] -> $B $a $B' *is* the specification. It's somewhat concerning however that I need a system that will do whole program analysis if necessary in order to avoid making assumptions. Only more experience will tell if it's feasible in practice. I haven't been able to try it with anything but programs of a few lines yet. - John