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

07/02/2018
by   Richard Roberts, et al.
0

Languages with explicit dynamic type checking are increasing in popularity in both practical development and programming education. Unfortunately, current implementations of these languages perform worse than either purely statically or purely dynamically typed languages. We show how virtual machines can use common optimizations to remove redundancy in dynamic type checking, by adding shallow structural type checks to Moth, a Truffle-based interpreter for Grace. Moth runs programs with dynamic type checks roughly as fast as programs without checks, so developers do not need to disable checks in production code, and educators can teach types without also teaching that types slow programs down.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/28/2021

Putting gradual types to work

In this paper, we describe our experience incorporating gradual types in...
research
11/13/2017

A Type Checking Algorithm for Higher-rank, Impredicative and Second-order Types

We study a type checking algorithm that is able to type check a nontrivi...
research
11/09/2017

Cons-free Programming with Immutable Functions

We investigate the power of non-determinism in purely functional program...
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
01/13/2020

Session Types with Arithmetic Refinements and Their Application to Work Analysis

Session types statically prescribe bidirectional communication protocols...
research
11/19/2021

A Transient Semantics for Typed Racket

Mixed-typed languages enable programmers to link typed and untyped compo...
research
10/07/2020

Type checking extracted methods

Many object-oriented dynamic languages allow programmers to extract meth...

Please sign up or login with your details

Forgot password? Click here to reset