Gradual Typing for a More Pure JavaScript
Abstract
Dynamically typed languages have surged in popularity in recent years, owing to
their flexibility and ease of use. However, for projects of a certain size dynamic
typing can cause problems of maintainability as refactoring becomes increasingly
difficult. One proposed solution is the use of gradual type systems, where
static type annotations are optional. This results in providing the best of both
worlds. The purpose of this project is to create a gradual type system on top
of JavaScript. Another goal is to explore the possibility of making guarantees
about function purity and immutability using the type system. The types and
their relations are defined and a basic type checker is implemented to confirm
the ideas. Extending type systems to be aware of side effects makes it easier to
write safer software. It is concluded that all of this is possible and reasonable
to do in JavaScript.
Degree
Student essay
Collections
View/ Open
Date
2020-10-29Author
ERLANDSSON, JAKOB
NYGREN, ERIK
VIGREN, OSKAR
WESTBERG, ANTON
Language
eng