ACM Home Page
Please provide us with feedback. Feedback
A comparative study of language support for generic programming
Full text PdfPdf (237 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications table of contents
Anaheim, California, USA
SESSION: Generics table of contents
Pages: 115 - 134  
Year of Publication: 2003
ISBN:1-58113-712-5
Also published in ...
Authors
Ronald Garcia  Indiana University - Bloomington, Bloomington, IN
Jaakko Jarvi  Indiana University - Bloomington, Bloomington, IN
Andrew Lumsdaine  Indiana University - Bloomington, Bloomington, IN
Jeremy G. Siek  Indiana University - Bloomington, Bloomington, IN
Jeremiah Willcock  Indiana University - Bloomington, Bloomington, IN
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 19,   Downloads (12 Months): 184,   Citation Count: 23
Additional Information:

abstract   references   cited by   index terms   review   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/949305.949317
What is a DOI?

ABSTRACT

Many modern programming languages support basic generic programming, sufficient to implement type-safe polymorphic containers. Some languages have moved beyond this basic support to a broader, more powerful interpretation of generic programming, and their extensions have proven valuable in practice. This paper reports on a comprehensive comparison of generics in six programming languages: C++, Standard ML, Haskell, Eiffel, Java (with its proposed generics extension), and Generic C. By implementing a substantial example in each of these languages, we identify eight language features that support this broader view of generic programming. We find these features are necessary to avoid awkward designs, poor maintainability, unnecessary run-time checks, and painfully verbose code. As languages increasingly support generics, it is important that language designers understand the features necessary to provide powerful generics and that their absence causes serious difficulties for programmers.


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
M. H. Austern. Generic Programming and the STL. Professional computing series. Addison-Wesley, 1999.
 
2
R. Backhouse, P. Jansson, J. Jeuring, and L. Meertens. Generic programming --- an introduction. In LNCS, volume 1608, pages 28--115. Springer-Verlag, 1999. Revised version of lecture notes for AFP'98.
 
3
G. Baumgartner, M. Jansche, and K. Laufer. Half & Half: Multiple Dispatch and Retroactive Abstraction for Java. Technical Report OSU-CISRC-5/01-TR08, Ohio State University, 2002.
 
4
R. Bellman. On a routing problem. Quarterly of Applied Mathematics, 16(1):87--90, 1958.
 
5
G. Bracha and J. Bloch. JSR 201: Extending the Java Programming Language with Enumerations, Autoboxing, Enhanced for loops and Static Import, December 2002. http://www.jcp.org/en/jsr/detail?id=201.
 
6
G. Bracha, N. Cohen, C. Kemper, S. Marx, et al. JSR 14: Add Generic Types to the Java Programming Language, April 2001. http://www.jcp.org/en/jsr/detail?id=014.
7
 
8
K. B. Bruce. Typing in object-oriented languages: Achieving expressibility and safety. Technical report, Williams College, 1996.
9
10
 
11
 
12
 
13
E. Dijkstra. A note on two problems in connexion with graphs. Numerische Mathematik, 1:269--271, 1959.
 
14
A. Hejlsberg. The C programming language. Invited talk at Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), 2002.
 
15
R. Hinze and J. Jeuring. Generic Haskell: Practice and theory. In Summer School on Generic Programming, LNCS. Springer-Verlag, 2002/2003.
 
16
M. Howard, E. Bezault, B. Meyer, D. Colnet, E. Stapf, K. Arnout, and M. Keller. Type-safe covariance: competent compilers can catch all catcalls. Apr. 2003.
 
17
International Standardization Organization (ISO). ANSI/ISO Standard 14882, Programming Language C++. 1 rue de Varembe, Case postale 56, CH-1211 Geneve 20, Switzerland, 1998.
 
18
M. Jazayeri, R. Loos, D. Musser, and A. Stepanov. Generic Programming. In Report of the Dagstuhl Seminar on Generic Programming, Schloss Dagstuhl, Germany, Apr. 1998.
 
19
 
20
 
21
S. P. Jones, J. Hughes, et al. Haskell 98: A Non-strict, Purely Functional Language, February 1999. http://www.haskell.org/onlinereport/.
 
22
S. P. Jones, M. Jones, and E. Meijer. Type classes: an exploration of the design space. In Haskell Workshop, June 1997.
 
23
24
 
25
 
26
G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. V. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In M. Akcsit and S. Matsuoka, editors, ECOOP'97 -- Object-Oriented Programming, vol. 1241 of Lecture Notes in Computer Science, pages 220--242, 1994.
 
27
K. Laufer, G. Baumgartner, and V. F. Russo. Safe structural conformance for Java. Computer Journal, 43(6):469--481, 2001.
 
28
B. Magnusson. Code reuse considered harmful. Journal of Object-Oriented Programming, 4(3), Nov. 1991.
 
29
B. McNamara and Y. Smaragdakis. Static interfaces in C++. In First Workshop on C++ Template Programming, October 2000.
 
30
31
 
32
B. Meyer. The start of an Eiffel standard. Journal of Object Technology, 1(2):95--99, July/August 2002. www.jot.fm.
 
33
Microsoft Corporation. Generics in C, September 2002. Part of the Gyro distribution of generics for .NET {34}.
 
34
Microsoft Corporation. Generics for C and .NET CLR, May 2003. http://research.microsoft.com/projects/clrgen/.
 
35
36
 
37
N. C. Myers. Traits: a new and useful template technique. C++ Report, June 1995.
 
38
M. Odersky. Inferred type instantiation without prototypes for GJ. lampwww.epfl.ch/~odersky/ftp/local-ti.ps, Jan. 2002.
 
39
R. Prim. Shortest connection networks and some generalizations. Bell System Technical Journal, 36:1389--1401, 1957.
 
40
N. Ramsey. Toward a calculus of signatures. http://www.eecs.harvard.edu/~nr/pubs/sigcalc-abstract.html, October 2001.
 
41
 
42
J. Siek and A. Lumsdaine. Concept checking: Binding parametric polymorphism in C++. In First Workshop on C++ Template Programming, October 2000.
43
 
44
 
45
A. A. Stepanov and M. Lee. The Standard Template Library. Technical Report X3J16/94-0095, WG21/N0482, ISO Programming Language C++ Project, May 1994.
 
46
 
47

CITED BY  23


REVIEW

"Jean-Pierre Banatre : Reviewer"

A comparative study of language support for generic programming is presented in this paper. It provides a comparison of generics in six programming languages, some of them well known, and some a little more obscure.

The basic language featur  more...

Collaborative Colleagues:
Ronald Garcia: colleagues
Jaakko Jarvi: colleagues
Andrew Lumsdaine: colleagues
Jeremy G. Siek: colleagues
Jeremiah Willcock: colleagues