41
you are viewing a single comment's thread
view the rest of the comments
[-] somegeek@programming.dev 3 points 1 day ago

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 named plus which 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.

this post was submitted on 28 Sep 2026
41 points (91.8% liked)

Programming

28628 readers
194 users here now

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

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS