News for hackers. Stuff that matters.
Re:A panoramic tour of Factor by jkarni on Monday December 15, 2014 @10:31AM (#8752437)
Huh? Why does Polish notation require parenthesis but Reverse Polish not? I thought the whole point of Polish notation was that it didn't require parens.

Unless your operators don't have a fixed arity, anyhow (Lisp's don't). But even then I don't see how RPN is in a better position...

Re:A panoramic tour of Factor by cicero on Monday December 15, 2014 @12:44PM (#8753187)
I think RPN was initially adopted for electronic calculators because it is easy to implement. As numbers are entered, they are pushed onto the stack, and then the operations pop operands off of the stack and push results back on the stack. Similarly, code in an RPN language like Forth can be executed left-to-right by pushing the operands onto the stack, and then the operation manipulates the contents of the stack.
Re:A panoramic tour of Factor by Murk on Monday December 15, 2014 @11:42AM (#8752828)
I am not sure it does, but:

(7 + 2) * (2 + 5) in normal, infix notation

* + 7 2 + 2 5 in polish notation, http://en.wikipedia.org/wiki/Polish_notation

vs reverse polish which is:

7 2 + 2 5 + * (or 7 2 25 + + * ) which is easy to evaluate, but not necessarily to read)

Re:A panoramic tour of Factor by jkarni on Monday December 15, 2014 @02:28PM (#8753825)
Sorry, I should have added some context:

>Notice that RPN requires no parenthesis, unlike the polish notation of Lisps where the operator comes first, and RPN requires no precedence rules, unlike the infix notation used in most programming languages and in everyday arithmetic.

This seems wrong to me. It's the lack of variadic functions that is the relevant difference to lisp in terms of doing away with parens, not PN vs RPN.

Love the article, though