Re: [stack] Notation for typed arrays in Cat
Manfred Von Thun <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <C42A78FE.1066%[email protected]> |
On 10/4/08 1:00 PM, "Christopher Diggins" <[email protected]> wrote: > > On Wed, Apr 9, 2008 at 3:44 AM, Manfred Von Thun > <[email protected] <mailto:m.vonthun%40latrobe.edu.au> > wrote: > >> > Now the marvellous bit: given the definition foo == bar baz zot, where bar >> > baz zot are primitives or have been previously defined, Prolog >> automatically >> > works out the input and output stacks for foo. I did not have to write any >> > code for this, in fact it took me some time to notice that Prolog had done >> > it. Such is the power of unification. > > Your approach to directly expose Prolog as the language for expressing > type is elegant and very powerful. My only hesitation is the syntax of > prolog, which may be accessible to a logician, are not great for > someone with only some collegial level math. In general the problem I > am having is with constructing an accessible syntax for people. > That would not a problem at all. The idea is that the implementation uses this notation internally, either because the whole implementation is in Prolog or because it uses a subset of Prolog to define the primitives. But the end-users never see the Prolog at all, they just see a concatenative language. When they define foo == bar baz zot, the unifier works out the input and the output stacks, and possibly provide an error message when there is a mismatch. So the end-users should never see the Prolog. - Manfred [Non-text portions of this message have been removed]