ACM Home Page
Please provide us with feedback. Feedback
Generics of a higher kind
Full text PdfPdf (726 KB)
Source
Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications table of contents
Nashville, TN, USA
SESSION: Type systems table of contents
Pages 423-438  
Year of Publication: 2008
ISBN:978-1-60558-215-3
Also published in ...
Authors
Adriaan Moors  Katholieke Universiteit Leuven, Leuven, Belgium
Frank Piessens  Katholieke Universiteit Leuven, Leuven, Belgium
Martin Odersky  École Polytechnique Fédérale de Lausanne, Lausanne, Switzerland
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 20,   Downloads (12 Months): 267,   Citation Count: 3
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1449764.1449798
What is a DOI?

ABSTRACT

With Java 5 and C# 2.0, first-order parametric polymorphism was introduced in mainstream object-oriented programming languages under the name of generics. Although the first-order variant of generics is very useful, it also imposes some restrictions: it is possible to abstract over a type, but the resulting type constructor cannot be abstracted over. This can lead to code duplication. We removed this restriction in Scala, by allowing type constructors as type parameters and abstract type members. This paper presents the design and implementation of the resulting type constructor polymorphism. Furthermore, we study how this feature interacts with existing object-oriented constructs, and show how it makes the language more expressive.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
 
3
P. Altherr and V. Cremet. Adding type constructor parameterization to Java. Accepted to the workshop on Formal Techniques for Java-like Programs (FTfJP'07) at the European Conference on Object-Oriented Programming (ECOOP), 2007.
 
4
 
5
G. M. Bierman, E. Meijer, and W. Schulte. The essence of data access in Comega. In A. P. Black, editor, ECOOP, volume 3586 of Lecture Notes in Computer Science, pages 287--311. Springer, 2005.
 
6
 
7
 
8
 
9
10
11
 
12
13
 
14
J. Carette, O. Kiselyov, and C. chieh Shan. Finally tagless, partially evaluated. In Z. Shao, editor, APLAS, volume 4807 of Lecture Notes in Computer Science, pages 222--238. Springer, 2007.
 
15
M. Chakravarty, S. L. P. Jones, M. Sulzmann, and T. Schrijvers. Class families, 2007. On the GHC Developer wiki, http://hackage.haskell.org/trac/ghc/wiki/TypeFunctions/ClassFamilies.
16
 
17
 
18
V. Cremet and P. Altherr. Adding type constructor parameterization to Java. Journal of Object Technology, 7(5):25--65, June 2008. Special Issue: Workshop on FTfJP, ECOOP 07. http://www.jot.fm/issues/issue_2008_06/article2/.
 
19
B. Emir, A. Kennedy, C. V. Russo, and D. Yu. Variance and generalized constraints for C# generics. In D. Thomas, editor, ECOOP, volume 4067 of Lecture Notes in Computer Science, pages 279--303. Springer, 2006.
 
20
E. Ernst. gbeta -- a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Department of Computer Science, University of Aarhus, Ú Arhus, Denmark, 1999.
 
21
22
 
23
J. Girard. Interpretation fonctionelle et elimination des coupures de l'arithmetique d'ordre superieur. Thèse d'État, Paris VII, 1972.
 
24
25
26
27
28
 
29
J. Hughes. Restricted datatypes in Haskell. Technical Report UU-CS-1999-28, Department of Information and Computing Sciences, Utrecht University, 1999.
 
30
G. Hutton and E. Meijer. Monadic Parser Combinators. Technical Report NOTTCS-TR-96-4, Department of Computer Science, University of Nottingham, 1996.
31
 
32
M. P. Jones. constructor classes & 'set' monad?, 1994. http://groups.google.com/group/comp.lang.functional/msg/e10290b2511c65f0.
 
33
M. P. Jones. A system of constructor classes: Overloading and implicit higher--order polymorphism. J. Funct. Program., 5(1):1--35, 1995.
 
34
E. Kidd. How to make data.set a monad, 2007. http://www.randomhacks.net/articles/2007/03/15/data-set-monad-haskell-macros.
 
35
D. Leijen and E. Meijer. Parsec: Direct style monadic parser combinators for the real world. Technical Report UU-CS-2001-27, Department of Computer Science, Universiteit Utrecht, 2001.
36
37
 
38
A. Moors, F. Piessens, and M. Odersky. Towards equal rights for higher-kinded types. Accepted for the 6th International Workshop on Multiparadigm Programming with Object-Oriented Languages at the European Conference on Object-Oriented Programming (ECOOP), 2007.
 
39
A. Moors, F. Piessens, and M. Odersky. Parser combinators in Scala. Technical Report CW491, Department of Computer Science, K.U. Leuven, 2008. http://www.cs.kuleuven.be/publicaties/rapporten/cw/CW491.abs.html.
 
40
A. Moors, F. Piessens, and M. Odersky. Safe type-level abstraction in Scala. In Proc. FOOL '08, Jan. 2008. http://fool08.kuis.kyoto-u.ac.jp/.
 
41
M. Odersky. Poor man's type classes, July 2006. Talk at IFIP WG 2.8, Boston.
 
42
M. Odersky. The Scala Language Specification, Version 2.6. EPFL, Nov. 2007. http://www.scala-lang.org/docu/files/ScalaReference.pdf.
 
43
M. Odersky, P. Altherr, V. Cremet, I. Dragos, G. Dubochet, B. Emir, S. McDirmid, S. Micheloud, N. Mihaylov, M. Schinz, L. Spoon, E. Stenman, and M. Zenger. An Overview of the Scala Programming Language (2. edition). Technical report, 2006.
 
44
M. Odersky, V. Cremet, C. Röckl, and M. Zenger. A nominal theory of objects with dependent types. In L. Cardelli, editor, ECOOP, volume 2743 of Lecture Notes in Computer Science, pages 201--224. Springer, 2003.
 
45
M. Odersky, L. Spoon, and B. Venners. Programming in Scala. Artima, 2008.
46
47
48
 
49
 
50
 
51
 
52
M. Steffen. Polarized Higher--Order Subtyping. PhD thesis, Universität Erlangen-Nürnberg, 1998.
 
53
 
54
P. Wadler. Comprehending monads. Mathematical Structures in Computer Science, 2(4):461--493, 1992.
 
55
56
 
57
S. Wehr, R. Lämmel, and P. Thiemann. JavaGI: Generalized interfaces for Java. In E. Ernst, editor, ECOOP, volume 4609 of Lecture Notes in Computer Science, pages 347--372. Springer, 2007.


Collaborative Colleagues:
Adriaan Moors: colleagues
Frank Piessens: colleagues
Martin Odersky: colleagues