Essential language support for generic programming

14 years 1 days ago
Essential language support for generic programming
Concepts are an essential language feature for generic programming in the large. Concepts allow for succinct expression of constraints on type parameters of generic algorithms, enable systematic organization of problem domain abstractions, and make generic algorithms easier to use. In this paper we present the design of a type system and semantics for concepts that is suitable for non-typeinferencing languages. Our design shares much in common with the type classes of Haskell, though our primary influence is from best practices in the C++ community, where concepts are used to document type requirements for templates in generic libraries. Concepts include a novel combination of associated types and sametype constraints that do not appear in type classes, but that are similar to nested types and type sharing in ML. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Constructs and Features—abstract data types, constraints, polymorphism; D.2.13 [Software Enginee...
Jeremy G. Siek, Andrew Lumsdaine
Added 26 Jun 2010
Updated 26 Jun 2010
Type Conference
Year 2005
Where PLDI
Authors Jeremy G. Siek, Andrew Lumsdaine
Comments (0)