HaloO Mr Castagna,

On Friday, 5. February 2010 23:13:25 you wrote:
> Actually I noticed an old post you did on this list 5 years ago. It
> contained the following drawing

Yeah it's a long time. And I've sort of lost interest in type theory.
But then I tried to persuade the list of a sophisticated type system.
But since I couldn't hack it myself nothing has happend. And Audrey
Tang is gone. He/She was a big fan of a type system as well and hacking
Pugs in Haskell.

>
>                   A|B         lub (lowest upper bound)
>                  /   \
>                 /     \
>                A   0   B
>               / \     / \
>              /   \   /   \
>             /     A&B     \   glb (greatest lower bound)
>            /  1  /   \  2  \
>           /     /  3  \     \
>
> and it is the only reference I found to intersection types (since A&B is
> the intersection of A and B (if you consider a class type as the set of all
> its instances) that is it contains all objects that are instance both of A
> and of B.
>
> Is this notation (or the general idea of intersection types) has been
> abandoned since then (I was not able to find it in the synopsis)

Yes, Larry never liked the idea of a type lattice and intermediate types
like A|B or A&B. The syntax is now used to simply mean doing A or B.

I've also proposed to have a constraint language in the where clause of
subset declarations that is usable for type checking. But the where clause
is now only a closure that is called when needed. So { $_ < 10 } is not a
subtype of { $_ < 20 }. So no predicate dispatch either.

Someone should explain the dispatch algorithm to you. I don't remember
exactly how the voting there works. This would explain what type narrowness
in the spec means.


Regards TSa.
-- 
"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to