• Alavi@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    2 days 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.