Sciweavers

TLDI
2005
ACM

An open and shut typecase

13 years 12 months ago
An open and shut typecase
Two different ways of defining ad-hoc polymorphic operations commonly occur in programming languages. With the first form polymorphic operations are defined inductively on the structure of types while with the second form polymorphic operations are defined for specific sets of types. In intensional type analysis operations are defined by induction on the structure of types. Therefore no new cases are necessary for user-defined types, because these types are equivalent to their underlying structure. However, intensional type analysis is “closed” to extension, as the behavior of the operations cannot be differentiated for the new types, thus destroying the distinctions that these types are designed to express. Haskell type classes on the other hand define polymorphic operations for sets of types. Operations defined by class instances are considered “open”—the programmer can add instances for new types without modifying existing code. However, the operations must be ...
Dimitrios Vytiniotis, Geoffrey Washburn, Stephanie
Added 26 Jun 2010
Updated 26 Jun 2010
Type Conference
Year 2005
Where TLDI
Authors Dimitrios Vytiniotis, Geoffrey Washburn, Stephanie Weirich
Comments (0)