Re:Why Structure and Interpretation of Computer Programs Mat...
by cageface on Sunday June 16, 2024 @11:09PM
(#40702002)
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.
[ Parent
| on HN ]
Re:Why Structure and Interpretation of Computer Programs Mat...
by skydhash on Monday June 17, 2024 @12:01AM
(#40702206)
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)
(if (read 0 (& buf) 1)
buf
"\0"))
Re:Why Structure and Interpretation of Computer Programs Mat...
by kaba0 on Monday June 17, 2024 @12:42AM
(#40702354)
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).
Re:Why Structure and Interpretation of Computer Programs Mat...
by hayley-patton on Monday June 17, 2024 @02:00AM
(#40702719)
This one? https://gist.github.com/no-defun-allowed/4f0a06e17b3ce74c6ae...
It also responds to a few parents up "almost all of the innovations in lisp [...] have been absorbed into more popular languages" - pervasive interactivity hasn't even been taken up by some "Lisps", let alone has it been absorbed outside Lisp.
Re:Why Structure and Interpretation of Computer Programs Mat...
by kaba0 on Monday June 17, 2024 @03:07AM
(#40702997)
Yes! Thanks for digging it up for me! I can’t find anything on google for the life of me since they switched to vector search, even though I used to be able to find some obscure blog post..