• Supercrunchy@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    10 days ago

    I self-learned lisp last year using the old SICP book, but I do consider myself a fairly expert programmer, and I felt that book was a bit hard at the end of it.

    IMHO the key difference of lisp’s eval wrt python’s eval is that it takes in input a parsed expression (a lisp list) and not a string. In lisp though you don’t have to use eval much, because the macros allow you to transform the expressions from your programs directly (take in input parsed code, return a different code structure to be executed). The quote and quasiquote functions are there to make that easy!

    I don’t know javascript enough, but in python you’d have to use eval and use some kind of parsing package crazyness if you wanted to implement a similar macro system!

    • AnarchistArtificer@slrpnk.net
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 days ago

      As a scientist who has ended up gradually becoming more of a programmer, I battled through the SICP after seeing the cult following it has. It’s a weird, but good book, and I couldn’t imagine a book like that using anything other than Lisp