Advanced search
1 file | 142.57 KB Add to list
Author
Organization
Abstract
Generic programming (GP) is an increasingly important trend in programming languages. Well-known GP mechanisms, such as type classes and the C++0x concepts proposal, usually combine two features: 1) a special type of interfaces; and 2) implicit instantiation of implementations of those interfaces. Scala implicits are a GP language mechanism, inspired by type classes, that break with the tradition of coupling implicit instantiation with a special type of interface. Instead, implicits provide only implicit instantiation, which is generalized to work for any types. This turns out to be quite powerful and useful to address many limitations that show up in other GP mechanisms. This paper synthesizes the key ideas of implicits formally in a minimal and general core calculus called the implicit calculus, and it shows how to build source languages supporting implicit instantiation on top of it. A novelty of the calculus is its support for partial resolution and higher-order rules (a feature that has been proposed before, but was never formalized or implemented). Ultimately, the implicit calculus provides a formal model of implicits, which can be used by language designers to study and inform implementations of similar mechanisms in their own languages.
Keywords
calculus, implicits, C++, programming languages, type classes, type system, generic programming

Downloads

  • (...).pdf
    • full text
    • |
    • UGent only
    • |
    • PDF
    • |
    • 142.57 KB

Citation

Please use this url to cite or link to this publication:

MLA
Oliveira, Bruno CdS, et al. “The Implicit Calculus: A New Foundation for Generic Programming.” PLDI 2012 : Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation, Association for Computing Machinery (ACM), 2012.
APA
Oliveira, B. C., Schrijvers, T., Choi, W., Lee, W., & Li, K. (2012). The implicit calculus: a new foundation for generic programming. PLDI 2012 : Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation. Presented at the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation (PLDI 2012), Beijing, PR China.
Chicago author-date
Oliveira, Bruno CdS, Tom Schrijvers, Wontae Choi, Wonchan Lee, and Kwangkeun Li. 2012. “The Implicit Calculus: A New Foundation for Generic Programming.” In PLDI 2012 : Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation. New York, NY, USA: Association for Computing Machinery (ACM).
Chicago author-date (all authors)
Oliveira, Bruno CdS, Tom Schrijvers, Wontae Choi, Wonchan Lee, and Kwangkeun Li. 2012. “The Implicit Calculus: A New Foundation for Generic Programming.” In PLDI 2012 : Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation. New York, NY, USA: Association for Computing Machinery (ACM).
Vancouver
1.
Oliveira BC, Schrijvers T, Choi W, Lee W, Li K. The implicit calculus: a new foundation for generic programming. In: PLDI 2012 : proceedings of the 33rd ACM SIGPLAN conference on programming language design and implementation. New York, NY, USA: Association for Computing Machinery (ACM); 2012.
IEEE
[1]
B. C. Oliveira, T. Schrijvers, W. Choi, W. Lee, and K. Li, “The implicit calculus: a new foundation for generic programming,” in PLDI 2012 : proceedings of the 33rd ACM SIGPLAN conference on programming language design and implementation, Beijing, PR China, 2012.
@inproceedings{2073319,
  abstract     = {{Generic programming (GP) is an increasingly important trend in programming languages. Well-known GP mechanisms, such as type classes and the C++0x concepts proposal, usually combine two features: 1) a special type of interfaces; and 2) implicit instantiation of implementations of those interfaces.
Scala implicits are a GP language mechanism, inspired by type classes, that break with the tradition of coupling implicit instantiation with a special type of interface. Instead, implicits provide only implicit instantiation, which is generalized to work for any types. This turns out to be quite powerful and useful to address many limitations that show up in other GP mechanisms.
This paper synthesizes the key ideas of implicits formally in a minimal and general core calculus called the implicit calculus, and it shows how to build source languages supporting implicit instantiation on top of it. A novelty of the calculus is its support for partial resolution and higher-order rules (a feature that has been proposed before, but was never formalized or implemented).
Ultimately, the implicit calculus provides a formal model of implicits, which can be used by language designers to study and inform implementations of similar mechanisms in their own languages.}},
  author       = {{Oliveira, Bruno CdS and Schrijvers, Tom and Choi, Wontae and Lee, Wonchan and Li, Kwangkeun}},
  booktitle    = {{PLDI 2012 : proceedings of the 33rd ACM SIGPLAN conference on programming language design and implementation}},
  isbn         = {{9781450312059}},
  keywords     = {{calculus,implicits,C++,programming languages,type classes,type system,generic programming}},
  language     = {{eng}},
  location     = {{Beijing, PR China}},
  pages        = {{10}},
  publisher    = {{Association for Computing Machinery (ACM)}},
  title        = {{The implicit calculus: a new foundation for generic programming}},
  year         = {{2012}},
}