← Back to context

Comment by cageface

14 days ago

I think it's quite telling that almost all of the innovations in lisp (garbage collection, first class functions, repl etc) have been absorbed into more popular languages except for s-expression syntax, which remains a small niche despite many great implementations of s-expression based languages.

Because as soon as you adopt the s-expressions, what you got is no longer <language>, but lisp itself. Something like this:

  static char _getch() {
    char buf;

    if (read(0, &buf, 1)) return buf;

    return '\0';
  }

would become:

  (define _getchar ()
    (declare static)
    (return-type 'char)
    (let ((buf (char)))
      (if (read 0 (& buf) 1)
        buf
        "\0")))

  • No. There is a good github gist rant I can’t find anymore, but if we call every AST in the form of s-expressions lisp, then is anything lisp? A programming language has to have an associated evaluation strategy, otherwise it’s just data. What you wrote only makes sense to execute as C code, which sure you can write a compiler for in your given lisp as well (so can you write a C compiler taking C AST in any other language, so it’s not special at all).

  • Right. From which we can infer people like many things about lisp except for the syntax.