🔗 Stack-Oriented Programming

🔗 Computing

A stack-oriented programming language is one that relies on a stack machine model for passing parameters. Several programming languages fit this description, notably Forth, RPL, PostScript, BibTeX style design language and many assembly languages (on a much lower level).

Stack-oriented languages operate on one or more stacks, each of which may serve a different purpose. Thus, programming constructs in other programming languages may need to be modified for use in a stack-oriented system. Further, some stack-oriented languages operate in postfix or Reverse Polish notation, that is, any arguments or parameters for a command are stated before that command. For example, postfix notation would be written 2, 3, multiply instead of multiply, 2, 3 (prefix or Polish notation), or 2 multiply 3 (infix notation).

Discussed on