POP-2 (also referred to as POP2) is a programming language developed around 1970 from the earlier language POP-1 (developed by Robin Popplestone in 1968, originally named COWSEL) by Robin Popplestone and Rod Burstall at the University of Edinburgh. It drew roots from many sources: the languages LISP and ALGOL 60, and theoretical ideas from Peter J. Landin. It used an incremental compiler, which gave it some of the flexibility of an interpreted language, including allowing new function definitions at run time and modification of function definitions while a program was running (both of which are features of dynamic compilation), without the overhead of an interpreted language. Description Stack POP-2's syntax was Algol-like, except that assignments were the other way round: instead of writing a := 3; one wrote 3 -> a; The reason for this was that the language had explicit notion of an operand stack; thus, the previous assignment could be written as two separate statements: 3; which evaluated the value 3 and left it on the stack, and -> a; which popped the top value off the stack and assigned it to the variable 'a'. Similarly, the function call f(x, y, z); could be written as x, y, z; f(); (commas and semicolons being largely interchangeable) or even x, y, z.f; or (x, y, z).f; Because of the stack-based paradigm, there was no need to distinguish between statements and expressions; thus, the two constructs if a > b then c -> e else d -> e close; and if a > b then c else d close -> e; were equivalent (note the use of close, as endif hadn't become a common end-of-if-clause notation yet). Arrays and doublet functions There were no special language constructs for creating arrays or record structures as they are commonly understood: instead, these were created with the aid of special builtin functions, e.g. newarray (for arrays that could contain any type of item) and newanyarray for creating restricted types of items. Thus, array element and record field accessors were simply special cases of a doublet function: this was a function that had another function attached as its updater, which was called on the receiving side of an assignment. Thus, if the variable a contained an array, then 3 -> a(4); was equivalent to updater(a)(3, 4); the builtin function updater returning the updater of the doublet. Of course, updater was itself a doublet and