Scala existential types
Existential types were introduced into the Scala language in version 2.7.0. I’ve had a brief attempt to make sense of them, however yesterday I had the need to understand them a lot better than my initial introduction allowed.
I’ve been load testing some code that we’ve seen exhausting database connections and needed to interact with the java.util.concurrent libraries, which use Java’s wildcard (?) type argument which get represented in Scala as existential types. In my attempt to get my head around what exactly they are, I’ve assembled some links, both Scala and Haskell specific. Though no real breakthroughs in understanding on my part as yet unfortunately.
Scala
- Scala Language Specification, pp. 23-25
- Existential types in Scala - David MacIver
- Existential types in Scala - Burak Emir
- Existential types - Henrik Huttunen