Rinus Plasmeijer en Marko van Eekelen
K.U. Nijmegen, Informatica
<rinus@cs.kun.nl> <marko@cs.kun.nl>
In this paper we present some features of the pure and lazy functional programming language Concurrent Clean. Clean is very similar to other modern lazy functional languages (such as Miranda, ML, Haskell and Hugs). Special about Clean is its high compilation speed and the quality of the produced code. In addition Clean offers a couple of very special features not found in other functional languages. Of particular importance for practical use is Clean's uniqueness typing enabling the incorporation of destructive updates of arbitrary objects within a pure functional framework and the creation of direct interfaces with the outside world. Clean's ``unique'' features have made it possible to predefine (in Clean) a sophisticated and efficient I/O library. The Clean I/O library enables a Clean programmer to specify interactive window based I/O applications on a very high level of abstraction. The library forms a platform independent interface to window systems which makes it possible to port window based I/O applications written in Clean to different platforms. Programs written under Unix can be ported to the Mac or PC without any modification of source code.
It is also possible to create lightweight processes which can communicate via files, shared state or message passing primitives ((a)synchronous message passing, remote procedure call). One can even program in an object oriented style using abstract datatypes, modules and existential types.
Future versions of Clean will furthermore allow to write distibuted programs running on a heterogeneous network of processors. Processes cannot only communicate data, but also programs (actually functions). These programs will be compiled ``just-in-time'' and can be dynamically linked to a running program. All these actions will be type-safe using a hybrid type system including both dynamic and static typing.
Clean runs under Unix (Sun), Linux (PC), OS2 (PC), MacOS. For windows '95/NT a version is under construction. Clean is available via www.cs.kun.nl/~clean.