Affiliation:
1. Indiana University, Bloomington, IN
Abstract
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-type-inferencing 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 same-type constraints that do not appear in type classes, but that are similar to nested types and type sharing in ML.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference57 articles.
1. Ada 95 Reference Manual 1997.]] Ada 95 Reference Manual 1997.]]
2. Programming with CGAL
3. Boost. Boost C++ Libraries. http://www.boost.org/.]] Boost. Boost C++ Libraries. http://www.boost.org/.]]
Cited by
9 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Lambda: the ultimate sublanguage (experience report);Proceedings of the ACM on Programming Languages;2019-07-26
2. COCHIS: Stable and coherent implicits;Journal of Functional Programming;2019
3. Lightweight, flexible object-oriented generics;ACM SIGPLAN Notices;2015-08-07
4. Early detection of type errors in C++ templates;Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation - PEPM '14;2014
5. Visualization of C++ Template Metaprograms;2010 10th IEEE Working Conference on Source Code Analysis and Manipulation;2010-09