Practical, Pluggable Types for a Dynamic Language

Haldimann, Niklaus; Denker, Marcus; Nierstrasz, Oscar (2009). Practical, Pluggable Types for a Dynamic Language. Computer languages, systems & structures, 35(1), pp. 48-64. New York, N.Y.: Elsevier 10.1016/

[img] Text
1-s2.0-S1477842408000262-main.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (403kB) | Request a copy

Most languages fall into one of two camps: either they adopt a unique, static type system, or they abandon static type-checks for run-time checks. Pluggable types blur this division by (i) making static type systems optional, and (ii) supporting a choice of type systems for reasoning about different kinds of static properties. Dynamic languages can then benefit from static-checking without sacrificing dynamic features or committing to a unique, static type system. But the overhead of adopting pluggable types can be very high, especially if all existing code must be decorated with type annotations before any type-checking can be performed. We propose a practical and pragmatic approach to introduce pluggable type systems to dynamic languages. First of all, only annotated code is type-checked. Second, limited type inference is performed on unannotated code to reduce the number of reported errors. Finally, external annotations can be used to type third-party code. We present Typeplug, a Smalltalk implementation of our framework, and report on experience applying the framework to three different pluggable type systems.

Item Type:

Journal Article (Original Article)


08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG)

UniBE Contributor:

Denker, Marcus and Nierstrasz, Oscar Marius








Factscience Import

Date Deposited:

04 Oct 2013 15:22

Last Modified:

13 Sep 2017 08:20

Publisher DOI:


Web of Science ID:


Uncontrolled Keywords:

Dynamic languages; Type systems; Programming languages



URI: (FactScience: 206782)

Actions (login required)

Edit item Edit item
Provide Feedback