Learn More
Several recent studies have introduced lightweight versions of Java: reduced languages in which complex features like threads and reeection are dropped to enable rigorous arguments about key properties such as type safety. We carry this process a step further, omitting almost all features of the full language (including interfaces and even assignment) to(More)
This paper presents <italic>type classes</italic>, a new approach to <italic>ad-hoc</italic> polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the &#8220;eqtype variables&#8221; of Standard ML. Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to issues that(More)
We present GJ, a design that extends the Java programming language with generic types and methods. These are both explained and implemented by translation into the unextended language. The translation closely mimics the way generics are emulated by programmers: it erases all type parameters, maps type variables to their bounds, and inserts casts where(More)
Links is a programming language for web applications that generates code for all three tiers of a web application from a single source, compiling into JavaScript to run on the client and into SQL to run on the database. Links supports rich clients running in what has been dubbed 'Ajax' style, and supports concurrent processes with statically-typed message(More)
This paper explores the use monads to structure functionalprograms. No prior knowledge of monads or category theory isrequired. Monads increase the ease with which programs may be modified.They can mimic the effect of impure features such as exceptions,state, and continuations; and also provide effects not easilyachieved with such features. The types of a(More)
Category theorists invented <italic>monads</italic> in the 1960's to concisely express certain aspects of universal algebra. Functional programmers invented <italic>list comprehensions</italic> in the 1970's to concisely express certain programs involving lists. This paper shows how list comprehensions may be generalised to an arbitrary monad, and how the(More)
The linear logic of J.-Y. Girard suggests a new type system for functional languages, one which supports operations that \change the world". Values belonging to a linear type must be used exactly once: like the world, they cannot be duplicated or destroyed. Such values require no reference counting or garbage collection , and safely admit destructive array(More)
The use of monads to structure functional programs is described. Monads provide a convenient framework for simulating eects found in other languages, such as global state, exception handling, output , or non-determinism. Three case studies are looked at in detail: how monads ease the modiication of a simple evaluatorr how monads act as the basis of a(More)