Saved in:
| Main Authors: | , |
|---|---|
| Format: | Preprint |
| Published: |
2024
|
| Subjects: | |
| Online Access: | https://arxiv.org/abs/2404.00338 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866911176868233216 |
|---|---|
| author | Castagna, Giuseppe Peyrot, Loïc |
| author_facet | Castagna, Giuseppe Peyrot, Loïc |
| contents | We define and study "row polymorphism" for a type system with set-theoretic types, specifically union, intersection, and negation types. We consider record types that embed row variables and define a subtyping relation by interpreting types into sets of record values and by defining subtyping as the containment of interpretations. We define a functional calculus equipped with operations for field extension, selection, and deletion, its operational semantics, and a type system that we prove to be sound. We provide algorithms for deciding the typing and subtyping relations.
This research is motivated by the current trend of defining static type system for dynamic languages and, in our case, by an ongoing effort of endowing the Elixir programming language with a gradual type system. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2404_00338 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Polymorphic Records for Dynamic Languages Castagna, Giuseppe Peyrot, Loïc Programming Languages F.3.3; D.1.1 We define and study "row polymorphism" for a type system with set-theoretic types, specifically union, intersection, and negation types. We consider record types that embed row variables and define a subtyping relation by interpreting types into sets of record values and by defining subtyping as the containment of interpretations. We define a functional calculus equipped with operations for field extension, selection, and deletion, its operational semantics, and a type system that we prove to be sound. We provide algorithms for deciding the typing and subtyping relations. This research is motivated by the current trend of defining static type system for dynamic languages and, in our case, by an ongoing effort of endowing the Elixir programming language with a gradual type system. |
| title | Polymorphic Records for Dynamic Languages |
| topic | Programming Languages F.3.3; D.1.1 |
| url | https://arxiv.org/abs/2404.00338 |