Affiliation:
1. Indiana University Bloomington, Bloomington, IN, USA
2. Rackspace Inc., San Antonio, TX, USA
Abstract
Combining static and dynamic typing within the same language offers clear benefits to programmers. It provides dynamic typing in situations that require rapid prototyping, heterogeneous data structures, and reflection, while supporting static typing when safety, modularity, and efficiency are primary concerns. Siek and Taha (2006) introduced an approach to combining static and dynamic typing in a fine-grained manner through the notion of type consistency in the static semantics and run-time casts in the dynamic semantics. However, many open questions remain regarding the semantics of gradually typed languages.
In this paper we present Reticulated Python, a system for experimenting with gradual-typed dialects of Python. The dialects are syntactically identical to Python 3 but give static and dynamic semantics to the type annotations already present in Python 3. Reticulated Python consists of a typechecker and a source-to-source translator from Reticulated Python to Python 3. Using Reticulated Python, we evaluate a gradual type system and three approaches to the dynamic semantics of mutable objects: the traditional semantics based on Siek and Taha (2007) and Herman et al. (2007) and two new designs. We evaluate these designs in the context of several third-party Python programs.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
15 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. How Profilers Can Help Navigate Type Migration;Proceedings of the ACM on Programming Languages;2023-10-16
2. GTP Benchmarks for Gradual Typing Performance;Proceedings of the 2023 ACM Conference on Reproducibility and Replicability;2023-06-27
3. SimTyper: sound type inference for Ruby using type equality prediction;Proceedings of the ACM on Programming Languages;2021-10-20
4. Impact of programming languages on machine learning bugs;Proceedings of the 1st ACM International Workshop on AI and Software Testing/Analysis;2021-07-11
5. Naïve transient cast insertion isn't (that) bad;Proceedings of the 16th ACM International Workshop on Implementation, Compilation, Optimization of OO Languages, Programs and Systems;2021-07-11