Re: [stack] syntax preference question
"William Tanksley, Jr" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
John Nowak <[email protected]> wrote: > William Tanksley, Jr wrote: >> Keep in mind that these "cleave combinators" are not actually >> combinators in this little language... They're part of the language's >> syntax. As such, it might possibly _not_ be a bad idea to make them >> participate in the typesystem. > Say I write this definition for a combining form: > foo(a, b) = [a, b] > If cleave is type-directed, there's no way to give this a type. You'd > need to require an annotation in such a case. I don't get it. Can you provide a specific counterexample where this doesn't receive a type? It seems to me that there are two possibilities: 1. The types of a and b are the same and are inferable. No problem. 2. The types of a and b differ or are not inferable. Print an error. ...but I know nothing of type inference. I'm clearly missing everything. > - John -Wm