TY - GEN
T1 - Semantic casts
T2 - 18th European Conference on Object-Oriented Programming, ECOOP 2004
AU - Findler, Robert Bruce
AU - Flatt, Matthew
AU - Felleisen, Matthias
N1 - Publisher Copyright:
© Springer-Verlag Berlin Heidelberg 2004.
PY - 2004
Y1 - 2004
N2 - Nominal subtyping forces programmers to explicitly state all of the subtyping relationships in the program. This limits component reuse, because programmers cannot anticipate all of the contexts in which a particular class might be used. In contrast, structural subtyping implicitly allows any type with appropriate structure to be used in a given context. Languagues with contracts exacerbate the problem. Since contracts are typically expressed as refinements of types, contracts in nominally typed languages introduce additional obstacles to reuse. To overcome this problem we show how to extend a nominally typed language with semantic casts that introduce a limited form of structural subtyping. The new language must dynamically monitor contracts, as new subtyping relationships are exploited via semantic casts. In addition, it must also track the casts to properly assign blame in case interface contract are violated.
AB - Nominal subtyping forces programmers to explicitly state all of the subtyping relationships in the program. This limits component reuse, because programmers cannot anticipate all of the contexts in which a particular class might be used. In contrast, structural subtyping implicitly allows any type with appropriate structure to be used in a given context. Languagues with contracts exacerbate the problem. Since contracts are typically expressed as refinements of types, contracts in nominally typed languages introduce additional obstacles to reuse. To overcome this problem we show how to extend a nominally typed language with semantic casts that introduce a limited form of structural subtyping. The new language must dynamically monitor contracts, as new subtyping relationships are exploited via semantic casts. In addition, it must also track the casts to properly assign blame in case interface contract are violated.
UR - http://www.scopus.com/inward/record.url?scp=72949110485&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=72949110485&partnerID=8YFLogxK
U2 - 10.1007/978-3-540-24851-4_17
DO - 10.1007/978-3-540-24851-4_17
M3 - Conference contribution
AN - SCOPUS:72949110485
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 365
EP - 389
BT - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
A2 - Odersky, Martin
PB - Springer Verlag
Y2 - 14 July 2004 through 18 July 2004
ER -