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/j.cl.2008.06.003

[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)

Division/Institute:

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

ISSN:

1477-8424

Publisher:

Elsevier

Language:

English

Submitter:

Factscience Import

Date Deposited:

04 Oct 2013 15:22

Last Modified:

13 Sep 2017 08:20

Publisher DOI:

10.1016/j.cl.2008.06.003

Web of Science ID:

000260328700005

Uncontrolled Keywords:

Dynamic languages; Type systems; Programming languages

BORIS DOI:

10.7892/boris.37131

URI:

https://boris.unibe.ch/id/eprint/37131 (FactScience: 206782)

Actions (login required)

Edit item Edit item
Provide Feedback