Prefix_notation Prefix_notation

Prefix notation - Definition and Overview

Related Words: Accent, Addition, Alphabet, Annotation, Approximation, Arrangement, Art, Bar, Bit, Blueprint, Cancel, Character, Characterization, Characters, Chart, Choreography, Cipher, Code, Comment, Commentary

Polish notation, also known as prefix notation was created by Jan Łukasiewicz. Operators are placed before operands.

+ 1 2

Yields (as expected) 3.

It is not limited to only two values, nor to just addition.

(* (+ 0 1) (+ 2 3)) 

Returns 5.

While the examples above use parantheses, one of the benefits of Polish notation is that, assuming the arity of each operator is known, parentheses are unnecessary: the order of operations is unique and easy to determine, if the expression is known to be correct. For example, assuming * and + are binary,

* + 0 1 + 2 3

can refer only to

(* (+ 0 1) (+ 2 3))

Polish notation is used in computer programming languages Lisp, Scheme (based on Lisp), and some others.

See also

Example Usage of notation

krazywane: Mental notation: next time stay at Palazzo or Bellagio, so many hotties!!!
centerdinPaly: Upcoming event: The Metaphysics of notation - 11/27/2009 http://bit.ly/6Pa2C8 #paloalto
josephholsten: @timbray The goal is to communicate clearly and concisely. if it's unambiguous, less notation is more concise. So usually, no comma. ∎
Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.