*** Welcome to piglix ***

POP-2


POP-2, often referred to as POP2 is a discontinued 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.

POP-2's syntax was Algol-like, except that assignments were the other way round: instead of writing

one wrote

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:

which evaluated the value 3 and left it on the stack, and

which popped the top value off the stack and assigned it to the variable 'a'. Similarly, the function call

could be written as

(commas and semicolons being largely interchangeable) or even

or

Because of the stack-based paradigm, there was no need to distinguish between statements and expressions; thus, the two constructs

and

were equivalent (note the use of close, as endif hadn't been invented yet).

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.


...
Wikipedia

...