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

Please sign up or login with your details

Forgot password? Click here to reset