Abstract
As a value flows across the boundary between interoperating languages, it must be checked and converted to fit the types and representations of the target language. For simple forms of data, the checks and coercions can be immediate; for higher order data, such as functions and objects, some must be delayed until the value is used in a particular way. Typically, these coercions and checks are implemented by an ad-hoc mixture of wrappers, reflection, and dynamic predicates. We observe that 1) the wrapper and reflection operations fit the profile of mirrors, 2) the checks correspond to contracts, and 3) the timing and shape of mirror operations coincide with the timing and shape of contract operations. Based on these insights, we present a new model of interoperability that builds on the ideas of mirrors and contracts, and we describe an interoperable implementation of Java and Scheme that is guided by the model.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
12 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Semantic Encapsulation using Linking Types;Proceedings of the 8th ACM SIGPLAN International Workshop on Type-Driven Development;2023-08-30
2. Semantic soundness for language interoperability;Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation;2022-06-09
3. Putting Gradual Types to Work;Practical Aspects of Declarative Languages;2021
4. Toward efficient gradual typing for structural types via coercions;Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation;2019-06-08
5. A spectrum of type soundness and performance;Proceedings of the ACM on Programming Languages;2018-07-30