Type Inference for Dynamically-Typed Languages


April 9, 2013


Avik Chaudhuri




Types play an important role in programming languages, by encoding contracts and invariants that enable modular programming and efficient code generation. Unfortunately, types can sometimes get in the way of rapid prototyping and code patching, which is why several popular languages for scripting are dynamically typed. These languages seem willing to trade the benefits of types for expressiveness and flexibility. Fortunately, type inference can restore most of the lost benefits to such languages, thereby letting programmers “have the cake and eat it too.”

In this talk I will describe two type inference techniques—one static and the other dynamic—for dynamically-typed languages. One technique is designed to improve the performance of dynamically-typed code without changing its behavior. The other technique is designed to unravel information on dynamically-typed code that is hard to analyze statically. I will conclude with some open questions on how to combine these techniques for pushing the state-of-the-art in compiling dynamically-typed languages.


Avik Chaudhuri

Avik Chaudhuri is a programming language researcher at Adobe, where he is currently working on the design and standardization of advanced language features such as concurrency for JavaScript. He is the lead designer of ActionScript 4, a significant revision of the language with a powerful type system that enables high-performance gaming on the Flash platform. Prior to joining Adobe, he was a post-doc at the University of Maryland, College Park, where he worked on improving security of Ruby on Rails and Android. He holds a Ph.D. in Computer Science from the University of California, Santa Cruz, where his dissertation work studied the application of programming language technologies to designing and verifying secure storage systems