Putting gradual types to work

01/28/2021
by   Bhargav Shivkumar, et al.
0

In this paper, we describe our experience incorporating gradual types in a statically typed functional language with Hindley-Milner style type inference. Where most gradually typed systems aim to improve static checking in a dynamically typed language, we approach it from the opposite perspective and promote dynamic checking in a statically typed language. Our approach provides a glimpse into how languages like SML and OCaml might handle gradual typing. We discuss our implementation and challenges faced – specifically how gradual typing rules apply to our representation of composite and recursive types. We review the various implementations that add dynamic typing to a statically typed language in order to highlight the different ways of mixing static and dynamic typing and examine possible inspirations while maintaining the gradual nature of our type system. This paper also discusses our motivation for adding gradual types to our language, and the practical benefits of doing so in our industrial setting.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/15/2018

Gradual Session Types

Session types are a rich type discipline, based on linear types, that li...
research
07/02/2018

Shallow Types for Insightful Programs: Grace is Optional, Performance is Not

Languages with explicit dynamic type checking are increasing in populari...
research
06/10/2023

The Design Principles of the Elixir Type System

Elixir is a dynamically-typed functional language running on the Erlang ...
research
07/10/2021

Approximate Normalization and Eager Equality Checking for Gradual Inductive Families

Harnessing the power of dependently typed languages can be difficult. Pr...
research
08/01/2018

Using Standard Typing Algorithms Incrementally

Modern languages are equipped with static type checking/inference that h...
research
07/08/2018

Graduality from Embedding-projection Pairs (Extended Version)

Gradually typed languages allow statically typed and dynamically typed c...
research
11/19/2021

A Transient Semantics for Typed Racket

Mixed-typed languages enable programmers to link typed and untyped compo...

Please sign up or login with your details

Forgot password? Click here to reset