42
What makes Lisp difficult to read?
(paultm.nl)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
The polish notation is the simplest thing to wrap you head around. Instead of operations being special syntax exceptions, they're just functions! Functions that take parameters.
the only syntax of lisps are
(myfun p1 p2 p3)Mathematical operations are no exception (unlike otger languages). To make it simpler, think of it like this:
+is just an alias (macro) for a function namedpluswhich does addition.(plus 1 2 4 5)is the same as(+ 1 2 4 5). We don't use infix notation because then that would be a syntactic exepction (like other languages) while this is the only syntax we have in lisp, for everything it's really simple.and also, how is
(1 + 2 + 4 + 5)(15 chars) better than(+ 1 2 4 5)(11 chars)? It's a conceptual shift and once you make it, it makes so much more sense.