Lambda the Ultimate

inactiveTopic Heterogenous lists (existential types)
started 2/3/2001; 2:05:14 AM - last post 2/7/2001; 5:42:39 PM
andrew cooke - Heterogenous lists (existential types)  blueArrow
2/3/2001; 2:05:14 AM (reads: 604, responses: 3)
Heterogenous lists (existential types)
If you used a static typed functional language you'll know that list elements have to all be the same type. Existential qualification (what a name!) gets round this by connecting types with possible actions on them.

From part of a large document on Haskell.
Posted to functional by andrew cooke on 2/3/01; 2:08:55 AM

Ehud Lamm - Re: Heterogenous lists (existential types)  blueArrow
2/4/2001; 2:34:56 AM (reads: 627, responses: 0)
It's existential quantification. I suggest you check the paper by Mitchell and Plotkin, Abstract types have existential type. I couldn't find an online copy, outside the ACM digital libray (which requires subscription).

Ehud Lamm - Re: Heterogenous lists (existential types)  blueArrow
2/7/2001; 1:23:04 PM (reads: 625, responses: 0)
A great overiview of type systems, which also touch on this can be found in this Cardelli paper. The classification, show graphically on page 35 (in the A4 version), is quite interesting. (Other page sizes and file formats available on the authoer's web site).

Chris Rathman - Re: Heterogenous lists (existential types)  blueArrow
2/7/2001; 5:42:39 PM (reads: 616, responses: 0)
When I looked at Existential types in Mercury, Hugs, and Clean, the main function that I saw was the ability to hold different types in a list. That is, lists in these languages require that all members are of a single type. In the classic cases of subtyping, different subtypes may share a common ancestor. The existential typing mechanism would allow the list to be constructed based on the parent type, while the details of the subclass are encapsulated within the existential typing mechanism.

Of course, I'm probably viewing this too much from the lens of inheritance and OOP, but that was the main attraction of existential types that appealed to me.