Re: [stack] Self Types
Manfred Von Thun <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <C2985EDC.9FF%[email protected]> |
I can¹t extract the paragraph from your link, so I have to paraphrase: You mention the difficulty of typing what in Cat is dup apply, or in Joy dup i. I have occasionally defined a combinator x == dup i, and I chose that name because it resembles the y combinator. In particular, x can do whatever y can do: implement recursive execution without a recursive definition. See the section ³Self-application² in my note: http://www.latrobe.edu.au/philosophy/phimvt/joy/jp-nestrec.html My recollection is that there are some difficulties about typing the y combinator in lambda calculus languages, but don¹t ask me for details. Presumably the same holds for the y combinator in concatenative languages, and by extension, for the x combinator in Joy and hence for dup apply in Cat. Hope this helps. - Manfred On 9/6/07 4:24 AM, "Christopher Diggins" <[email protected]> wrote: > > My previous plan for dealing with recursive (self-referential) types > was to use labels. I am currently looking at using "self" types, which > are more limited, but I think sufficient. > > http://cdiggins.com/2007/06/07/self-types/ > > Christopher > > [Non-text portions of this message have been removed]