An informal introduction to Pawns: a declarative/imperative language

Lee Naish

Pawns is yet another programming language under development which attempts to combine the elegance of declarative programming with the algorithmic expressive power of imperative programming. Algebraic data types can be defined and viewed as decriptions of high level values which can be manipulated in declarative ways. The same type definitions can also be viewed at a much lower level, involving pointers to possibly shared data structures which can be destructively updated. Pawns programs contain annotations and declarations which indicate whether the high or low level view should be used in different program components and what variables may be updated at each point. This makes all effects obvious and allows efficient imperative code to be encapsulated within a declarative interface, with "purity" of functions and consistency of annotations and declarations being guaranteed by the compiler.

Keywords: functional programming language, destructive update, mutability, effects, algebraic data type, sharing analysis