[stack] Re: Notation for typed arrays in Cat

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Apr 4, 2008, at 11:26 AM, Christopher Diggins wrote:

> I am again playing with the idea of how to introduce typed arrays in
> to Cat.
> The following is the notation that I prefer

Here's what I'm doing in Fifth:

Row variable:       A B XY        -- uppercase
Scalar variable:    a b xy        -- lowercase
Atomic type:        Num Char File -- titlecase, 2+ chars
Parameterized type: (Tree a) (Ref Int) (Table a b)
List:               {a} {Int} {String}
Quotation:          [A b c -> A c b] [A b -> A b b] [A [A -> B] -> B]

And an example:

   unlist :: A {b} [A -> C] [A b {b} -> C] -> C

Note that the quotation syntax is a bit more complex in practice due
to effects. The version above is what programmers use when giving
annotations if they don't care to be more explicit.

- John
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.