Treffer: Associated types and constraint propagation for mainstream object-oriented generics

Title:
Associated types and constraint propagation for mainstream object-oriented generics
Source:
Proceedings of the 20th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'05)ACM SIGPLAN notices. 40(10):1-19
Publisher Information:
Broadway, NY: ACM, 2005.
Publication Year:
2005
Physical Description:
print, 39 ref
Original Material:
INIST-CNRS
Document Type:
Konferenz Conference Paper
File Description:
text
Language:
English
Author Affiliations:
Texas A&M University, Computer Science College, Station, TX 77843, United States
Indiana University, Open Systems Lab, Bloomington, IN 47405, United States
ISSN:
1523-2867
Rights:
Copyright 2006 INIST-CNRS
CC BY 4.0
Sauf mention contraire ci-dessus, le contenu de cette notice bibliographique peut être utilisé dans le cadre d’une licence CC BY 4.0 Inist-CNRS / Unless otherwise stated above, the content of this bibliographic record may be used under a CC BY 4.0 licence by Inist-CNRS / A menos que se haya señalado antes, el contenido de este registro bibliográfico puede ser utilizado al amparo de una licencia CC BY 4.0 Inist-CNRS
Notes:
Computer science; theoretical automation; systems
Accession Number:
edscal.17355725
Database:
PASCAL Archive

Weitere Informationen

Support for object-oriented programming has become an integral part of mainstream languages, and more recently generic programming has gained widespread acceptance as well. A natural question is how these two paradigms, and their underlying language mechanisms, should interact. One particular design option, that of using subtyping to constrain the type parameters of generic functions, has been chosen in the generics of Java and those planned for a future revision of C#. Certain shortcomings have previously been identified in using subtyping for constraining parametric polymorphism in the context of generic programming. To address these, we propose extending object-oriented interfaces and subtyping to include associated types and constraint propagation. Associated types are type members of interfaces and classes. Constraint propagation allows certain constraints on type parameters to be inferred from other constraints on those parameters and their use in base class type expressions. The paper-demonstrates these extensions in the context of C# (with generics), describes translation of the extended features to C#. and presents a formalism proving their safety. The formalism is applicable to other mainstream object-oriented languages supporting F-bounded polymorphism, such as Java.