I'm reading about LISP.
I understand how prefix notation works at a certain level, but I was wondering if there are any tricks to making it intuitive.
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.Sign up to join this community
You could think about it as a kind of function call:
(operator operand1 operand2 ...)
There is nothing very special about it. If you overload operators in C++ (and many other languages that allow it) you often have to define this kind of function exactly that way:
MyClass operator+(MyClass const& x, MyClass const& y);
Many languages use a mix of prefix, infix and even postfix.
Lisp just uses only prefix - by default. If sin(x) is intuitive from mathematics, then (sin x) is not far away. If move(dog,home) is a traditional procedure call, then in Lisp it is just (move dog home).
Lisp does not make any exception for mathematics and treats +, -, * and others like ordinary function calls.