…from people who seem to refuse to install paredit or coloring plugins for either? ps lisp syntax ftw, it’s a feature!

  • yogsototh@programming.dev
    link
    fedilink
    arrow-up
    11
    ·
    5 months ago

    S-expressions are a hack because the Lisp devs didn’t know how to make an actual compiler, and instead had the users write the syntax tree for them. (For legal reasons I am being facetious).

    Just for anyone thinking you are serious; https://en.wikipedia.org/wiki/M-expression I love how S-expression existed.

    McCarthy had planned to develop an automatic Lisp compiler (LISP 2) using M-expressions as the language syntax and S-expressions to describe the compiler’s internal processes. Stephen B. Russell read the paper and suggested to him that S-expressions were a more convenient syntax. Although McCarthy disapproved of the idea, Russell and colleague Daniel J. Edwards hand-coded an interpreter program that could execute S-expressions.[2] This program was adopted by McCarthy’s research group, establishing S-expressions as the dominant form of Lisp.

    • Corbin@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      And for anybody thinking of implementing M-expressions, look at Wolfram Mathematica, which is the only popular M-expression-oriented language. It turns out that high-level graph-rewriting semantics are difficult to make efficient! (If you want to try, you might also want to look at GHC or other efficient graph-rewriters to see what the state of the art is like outside Planet Wolfram.)