News for hackers. Stuff that matters.
Re:How a Blind Person Programs by zersiax on Thursday January 29, 2015 @06:49PM (#8969648)
I am afraid I didn't understand most of the sentence. I am not familiar with the notation you are referring to, not the type of expression you mean :(
Re:How a Blind Person Programs by murbard2 on Friday January 30, 2015 @09:37AM (#8972171)
Infix notation is when the operators goes in the middle. For instance, the expression: x * (y-z) uses infix notation. When I look at it, I can see at a glance that x is multiplied by the difference between y and z. However, were I to listen to it, I wouldn't know when to expect the parenthesis to close. I would have to remember that I am within a parenthesis.

Postfix notation, or reverse polish notation places operators after the operands. So that same expression would read " x y z - * ". The idea is that you push x on a stack, then y, then z. Then comes the minus sign, you pop the top two elements, y and z, and push their difference on the stack. Finally you pop the two elements, x and y-z, and replace them with their product.

In reverse polish notation, you still need to remember something, the state of the stack, but there are no parenthesis. I get the impression it would easier to parse if listening to the expression, but I may be wrong.

So which parses most easily for you? x * (y-z), or x y z - * ?