Whereas dynamic typing enables rapid prototyping and easy experimentation, static typing provides early error detection and better compile time optimization. Gradual typing provides the best of both worlds. This paper shows how to define and implement gradual typing in Dylan, traditionally a dynamically typed language. Dylan poses several special challenges for gradual typing, such as multiple return values, variable-arity methods and generic functions (multiple dispatch).
In this paper Dylan is extended with function types and parametric polymorphism. We implemented the type system and a unification-based type inference algorithm in the mainstream Dylan compiler. As case study we use the Dylan standard library (roughly 32000 lines of code), which witnesses that the implementation generates faster code with fewer errors. Some previously undiscovered errors in the Dylan library were revealed.
We present a domain specific language for manipulation of binary data, or structured byte sequences, as they appear in everyday applications such as networking or graphics file manipulation. Our DSL is implemented as an extension of the Dylan language, making use of the macro facility. Dylan macros, unlike Common Lisp macros, are implemented as pattern matches and substitutions on the parse tree, and we will show the strengths and limits of this approach for the given problem.
A generic function is similar to an overloaded operator, but provides a way to select an appropriate behavior at run-time instead of compile-time. Dujardin and colleagues have proposed an algorithm for building and compressing generic function dispatch tables.
We present several modifications to their algorithm, including an improvement to Pseudo-Closest-Poles and two new algorithms for compressing pole tables. The two new compression algorithms are simple and fast, and one produces smaller output than the original.
As the computer industry’s reliance on component software increases, it becomes increasingly difficult to integrate complex component systems. Modern development environments take a variety of approaches to simplifying this programming problem. This article describes how three programming language implementations provide access to Microsoft’s Component Object Model (COM), and how they attempt to reduce the complexity of writing and using COM objects.
Object-oriented languages with multiple inheritance and automatic conflict resolution typically use a linearization of superclasses to determine which version of a property to inherit when several superclasses provide definitions. Recent work has defined several desirable characteristics for linearizations, the most important being monotonicity, which prohibits inherited properties from skipping over direct superclasses. Combined with Dylan’s sealing mechanism, a monotonic linearization enables some compile-time method selection that would otherwise be impossible in the absence of a closed-world assumption.The Dylan linearization is monotonic, easily described, strictly observes local precedence order, and produces the same ordering as CLOS when that is monotonic. We present an implementation based on merging and a survey of class heterarchies from several large programs, analyzing where commonly used linearizations differ.
An interesting usability study of a prototype development environment for the Dylan programming language is presented here. This study’s purpose is to determine just how close the prototype is to developers. New approaches to source code organization and to the relationship between the environment and the application being developed are introduced. An asessment of how effectively the prototype conveys these innovations to Dylan developers is also given, followed by some proposed improvements.