existential-type

What is an Existential Type?

I read through the wikipedia entry on this. I gathered that they're called existential types because of the existential operator (∃). I'm not sure what the point of it is, though. What's the difference between T = ∃X { X a; int f(X); } and T = ∀x { X a; int f(X); } ...

Scala's existential types

A bit more specific than this question, can someone tell me what is the difference between Scala's existential types and Java's wildcard, prefereably with some illustrative example? In everything I've seen so far, they seem to be pretty equivalent. Edit: A few references. Martin Odersky mentions them; Google's top hit for my question ...

Why the following Scala code does not compile unless explicit type parameters are added?

object Test extends Application { // compiles: Map[Int, Value]( 0 -> KnownType(classOf[Object]), 1 -> UnknownValue()) // does not compile: Map( 0 -> KnownType(classOf[Object]), 1 -> UnknownValue()) } sealed trait Value { def getType: Option[Class[_]] } case class UnknownValue() extends Value { def getType = ...

Haskell counted list type

So, just for fun, I've been playing with a CountedList type in Haskell, using Peano numbers and smart constructors. Type-safe head and tail just seem really cool to me. And I think I've reached the limit of what I know how to do {-# LANGUAGE EmptyDataDecls #-} module CountedList ( Zero, Succ, CountedList, toList, ofList, empty,...

Does this code describe an Existential Type in C#?

Currently watching Bart De Smet's explanation of IQueryable and he mentioned Existential Types (which I've been curious about for some time). After reading the answers to this question I'm just wondering if this is a way to construct it in C#: public abstract class ExistentialType { private ExistentialType() { } public abstrac...