Sciweavers

OOPSLA
2010
Springer

Type classes as objects and implicits

13 years 2 months ago
Type classes as objects and implicits
Type classes were originally developed in Haskell as a disciplined alternative to ad-hoc polymorphism. Type classes have been shown to provide a type-safe solution to important challenges in software engineering and programming languages such as, for example, retroactive extension of programs. They are also recognized as a good mechanism for concept-based generic programming and, more recently, have evolved into a mechanism for type-level computation. This paper presents a lightweight approach to type classes in object-oriented (OO) languages with generics using the CONCEPT pattern and implicits (a type-directed implicit parameter passing mechanism). This paper also shows how Scala’s type system conspires with implicits to enable, and even surpass, many common extensions of the Haskell type class system, making Scala ideally suited for generic programming in the large. Categories and Subject Descriptors D.3.2 [Programming Languages]: Language Classifications—Functional Languages,...
Bruno C. d. S. Oliveira, Adriaan Moors, Martin Ode
Added 29 Jan 2011
Updated 29 Jan 2011
Type Journal
Year 2010
Where OOPSLA
Authors Bruno C. d. S. Oliveira, Adriaan Moors, Martin Odersky
Comments (0)