Abstract
Intensional polymorphism, the ability to dispatch to different routines based on types at run time, enables a variety of advanced implementation techniques for polymorphic languages, including tag-free garbage collection, unboxed function arguments, polymorphic marshalling, and flattened data structures. To date, languages that support intensional polymorphism have required a type-passing (as opposed to type-erasure) interpretation where types are constructed and passed to polymorphic functions at run time. Unfortunately, type-passing suffers from a number of drawbacks: it requires duplication of constructs at the term and type levels, it prevents abstraction, and it severely complicates polymorphic closure conversion.We present a type-theoretic framework that supports intensional polymorphism, but avoids many of the disadvantages of type passing. In our approach, run-time type information is represented by ordinary terms. This avoids the duplication problem, allows us to recover abstraction, and avoids complications with closure conversion. In addition, our type system provides another improvement in expressiveness; it allows unknown types to be refined in place thereby avoiding certain beta-expansions required by other frameworks.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
15 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Generic go to go: dictionary-passing, monomorphisation, and hybrid;Proceedings of the ACM on Programming Languages;2022-10-31
2. Safety and conservativity of definitions in HOL and Isabelle/HOL;Proceedings of the ACM on Programming Languages;2018-01
3. Typed self-evaluation via intensional type functions;ACM SIGPLAN Notices;2017-05-11
4. Typed self-evaluation via intensional type functions;Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages;2017-01
5. System FC with explicit kind equality;ACM SIGPLAN Notices;2013-11-12