Jukka Lehtosalo


I have listed below some of things I have been working or might be working on in the future.

I am currently developing mypy, an experimental variant of Python with seamless dynamic and static typing. The mypy project aims to bring the benefits to static typing to Python developers, while also providing an option to use dynamic typing when it makes sense. Mypy will be mostly backward compatible with Python. A major difference between mypy and the current version of Alore is that mypy will have runtime type safety (at least mostly).
I have designed and implemented the Alore programming language. My aim is to combine, as much as possible, the flexibility and high productivity of dynamically-typed scripting languages with the more favourable software engineering properties of statically-typed object-oriented languages such as Java or Scala. Alore is designed to be in many ways very similar to Python for practical reasons, but it is also well-suited for both dynamic and static typing. Existing scripting languages (including Python, PHP, JavaScript and Ruby) have not been designed for static typing and pose many challenges for type system designers. I believe that a new language can help provide a clearer practical understanding of the domain. I am currently in the process adopting the lessons learned when developing Alore to a Python (see above).
Static type systems for scripting languages
I am currently working on optional (or pluggable) static type systems for Alore that enable the arbitrary mixing of dynamically-typed and statically-typed code within a single program. An optional type system does not affect the runtime behaviour of programs, which simplifies learning the language and programming in it (the semantics can be simple and uniform) and virtual machine implementation (implementations may ignore static types). Additionally, introducing static types to programs is possible in a way that can be guaranteed not to introduce defects. It may also be a pragmatic approach for adding static typing to existing scripting languages such as Python or Ruby.

A novel feature I have proposed is optional runtime monitoring of type errors (see publications). Runtime type errors arising from the interaction of dynamically-typed and statically-typed code may be ignored or not accurately reported by a language with an optional type system. Optional runtime monitoring tracks these type errors but only reports them as soft errors that do not affect program execution. Thus the desirable properties of optional type systems are preserved, but runtime type errors can still be precisely reported.

Compiler for Alore
High-level dynamically-typed languages are challenging for compiler-writers. Recent advances in JavaScript virtual machines show that improving the performance of traditional interpreted VMs is practical for real-world applications, but there is still a long way to go before reaching the performance of statically-typed languages outside specific niches. I am exploring different approaches of compiling Alore programs. This project is still in early stages.
Type reconstruction tool for partially-typed code
Adding static types to dynamically-typed code can be difficult and time-consuming. Type reconstruction or type inference tools can help this process by partially or fully automating this. I have worked on a type reconstruction tool for partially-typed Alore programs.
Pluggable types for parallel programming
I'm also working on parallel programming models for dynamically-typed languages to simplify taking advantage of multicore processors. I am thinking about extending my optional type system with features that can be applied to parallel programming (in the spirit of ownership types or immutable types, perhaps).