A proposal for making Eiffel type-safe
The Computer Journal - Special issue on object-oriented programming
Eiffel: the language
Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
The design and evolution of C++
The design and evolution of C++
Addendum to the proceedings of the 10th annual conference on Object-oriented programming systems, languages, and applications (Addendum)
Objective ML: a simple object-oriented extension of ML
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Pattern languages of program design 3
Making the future safe for the past: adding genericity to the Java programming language
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Contraint-based polymorphism in Cecil: towards a practical and static type system
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Generic programming and the STL: using and extending the C++ Standard Template Library
Generic programming and the STL: using and extending the C++ Standard Template Library
The generic graph component library
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Design and implementation of generics for the .NET Common language runtime
Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
The boost graph library: user guide and reference manual
The boost graph library: user guide and reference manual
The Definition of Standard ML
Java Language Specification, Second Edition: The Java Series
Java Language Specification, Second Edition: The Java Series
ECOOP '01 Proceedings of the 15th European Conference on Object-Oriented Programming
Advanced Functional Programming, Second International School-Tutorial Text
A comparative study of language support for generic programming
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
Adding wildcards to the Java programming language
Proceedings of the 2004 ACM symposium on Applied computing
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Essential language support for generic programming
Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
An expressive language of signatures
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Associated types and constraint propagation for mainstream object-oriented generics
OOPSLA '05 Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
A language for generic programming
A language for generic programming
Type error slicing in implicitly typed higher-order languages
ESOP'03 Proceedings of the 12th European conference on Programming
Language requirements for large-scale generic libraries
GPCE'05 Proceedings of the 4th international conference on Generative Programming and Component Engineering
Concepts: linguistic support for generic programming in C++
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Library composition and adaptation using c++ concepts
GPCE '07 Proceedings of the 6th international conference on Generative programming and component engineering
Comparing libraries for generic programming in haskell
Proceedings of the first ACM SIGPLAN symposium on Haskell
A comparison of c++ concepts and haskell type classes
Proceedings of the ACM SIGPLAN workshop on Generic programming
GPCE '08 Proceedings of the 7th international conference on Generative programming and component engineering
Generic Libraries in C++ with Concepts from High-Level Domain Descriptions in Haskell
DSL '09 Proceedings of the IFIP TC 2 Working Conference on Domain-Specific Languages
The function concept in C++: an empirical study
Proceedings of the 2009 ACM SIGPLAN workshop on Generic programming
Reusable, generic program analyses and transformations
GPCE '09 Proceedings of the eighth international conference on Generative programming and component engineering
Minimizing dependencies within generic classes for faster and smaller programs
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Science of Computer Programming
OpenMP extensions for generic libraries
IWOMP'08 Proceedings of the 4th international conference on OpenMP in a new era of parallelism
Libraries for generic programming in haskell
AFP'08 Proceedings of the 6th international conference on Advanced functional programming
Type classes as objects and implicits
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Generic programming with c++ concepts and haskell type classes: A comparison
Journal of Functional Programming
A language for generic programming in the large
Science of Computer Programming
JavaGI: The Interaction of Type Classes with Interfaces and Inheritance
ACM Transactions on Programming Languages and Systems (TOPLAS)
ConceptClang: an implementation of C++ concepts in Clang
Proceedings of the seventh ACM SIGPLAN workshop on Generic programming
Adaptable generic programming with required type specifications and package templates
Proceedings of the 11th annual international conference on Aspect-oriented Software Development
Design of concept libraries for c++
SLE'11 Proceedings of the 4th international conference on Software Language Engineering
SSGIP'10 Proceedings of the 2010 international spring school conference on Generic and Indexed Programming
Proceedings of the Twelfth Workshop on Language Descriptions, Tools, and Applications
Efficiency of subtype test in object oriented languages with generics
Proceedings of the 8th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems
Hi-index | 0.01 |
Many modern programming languages support basic generics, sufficient to implement type-safe polymorphic containers. Some languages have moved beyond this basic support, and in doing so have enabled a broader, more powerful form of generic programming. This paper reports on a comprehensive comparison of facilities for generic programming in eight programming languages: C++, Standard ML, Objective Caml, Haskell, Eiffel, Java, C# (with its proposed generics extension), and Cecil. By implementing a substantial example in each of these languages, we illustrate how the basic roles of generic programming can be represented in each language. We also identify eight language properties that support this broader view of generic programming: support for multi-type concepts, multiple constraints on type parameters, convenient associated type access, constraints on associated types, retroactive modeling, type aliases, separate compilation of algorithms and data structures, and implicit argument type deduction for generic algorithms. We find that these features are necessary to avoid awkward designs, poor maintainability, and painfully verbose code. As languages increasingly support generics, it is important that language designers understand the features necessary to enable the effective use of generics and that their absence can cause difficulties for programmers.