Title
A formalization of typed lua
Abstract
Programmers often migrate from a dynamically typed to a statically typed language when their simple scripts evolve into complex programs. Optional type systems are one way of having both static and dynamic typing in the same language, while keeping its dynamically typed semantics. This makes evolving a program from dynamic to static typing a matter of describing the implied types that it is using and adding annotations to make those types explicit. Designing an optional type system for an existing dynamically typed language is challenging, as its types should feel natural to programmers that are already familiar with this language. In this work, we give a formal description of Typed Lua, an optional type system for Lua, with a focus on two of its novel type system features: incremental evolution of imperative record and object types that is both lightweight and type-safe, and projection types, a combination of flow typing, functions that return multiple values, and multiple assignment. While our type system is tailored to the features and idioms of Lua, its features can be adapted to other imperative scripting languages.
Year
DOI
Venue
2015
10.1145/2816707.2816709
Dynamic Languages Symposium
Keywords
Field
DocType
Optional Type Systems,Gradual Typing,Lua,Languages,Design
Type system,Programming language,Object type,Computer science,Type inference,Theoretical computer science,Strong and weak typing,Type constructor,Duck typing,Gradual typing,Scripting language
Conference
Volume
Issue
ISSN
51
2
0362-1340
ISBN
Citations 
PageRank 
978-1-4503-3690-1
4
0.47
References 
Authors
11
3
Name
Order
Citations
PageRank
André Murbach Maidl1173.10
Fabio Mascarenhas2285.29
Roberto Ierusalimschy346354.25