In Prefix notation, the operator comes before the operands (e.g., +a b
).
In Postfix notation, the operator comes after the operands (e.g., a b+
).
In Infix notation, the operator comes in between the operands (e.g., a+b
).
Most practical languages use infix notation for binary operators, but some use prefix or postfix.
So, what are the advantages and disadvantages of each type of notation?
+
,-
,~
,!
). Many use postfix (?
,!!
) $\endgroup$