A few feral cats in an ALGOL trenchcoat.

This article provides a technical overview of the POP-2 programming language, noting its ALGOL-like syntax and stack-based evaluation scheme. It highlights the language's efficiency and suitability for small-memory systems.
Why it matters
It serves as a niche technical reference for developers interested in historical or minimalist programming languages.
The syntax of POP-2 is ALGOL-like, assignments are in the infix notation , but the evaluation scheme is deeply concatenative .
foo := 123; ( In Pascal ) 123 -> foo; ( In POP-2 ) The language has the explicit notion of an operand stack. Thus, the prior assignment can be written as two separate statements where the first one leaves a value on the stack, and the second, consumes it:
123; -> foo; Typical POP-2 Programmer Interpreter The language can easily be compiled for Uxn , in fact, the language is so elegant and small that an entire compiler is less than 800 lines and fits within 2.5kb of memory.
At first glance, the language looks a little like Pascal . A statement begins with a keyword, followed by expressions, terminated by a semi-colon. Evaluation consists of moving through the program leaving values on the stack as needed.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in