4 ms·
"One of the major characteristics of Lisp is that Lisp programs are Lisp data"
- pluies 16y agoSoo... What I get is: John McCarthy is the inventor of Lisp, the language we all tell ourselves we'll learn one day. Lisp is used in Emacs macro. However, I honestly don't get what's going on here. Is that a subtle troll against Perl? Just a reminder that in Lisp, data and program are interchangeable?
- abrahamsen 16y agoIt's a monster discussion, and threading seems to be broken at that part, so it's hard to say. But the main part of the discussion concerns a suggestion to replace Emacs Lisp with Perl. McCarthy's concern seems to be whether Emacs uses the ability of Lisp to treat code as data, and whether Perl has that facility. A couple of answers gave examples of Emacs using that ability.
- sigzero 16y agoI could be wrong, and I love Perl, but I don't see how it could replace elisp. I think it would be cool though. I often thought that Vim should dump vimscript for a preferred language extension of either Perl or Python.
- julian37 16y ago$ find emacs-23.2/ -name \*.c | xargs cat | wc -l 339497 $ find emacs-23.2/ -name \*.el | xargs cat | wc -l 1391690 Seeing that about 80% of Emacs code is Lisp, not to mention the countless extensions that don't ship with Emacs, and much of the C code is geared towards being called from Lisp, suggesting to replace Emacs Lisp by Perl is essentially suggesting to rewrite Emacs from scratch.
- carussell 16y agoThe message was written in 1998. I don't think anyone is considering doing that now.
- pluies 16y agoThanks for the explanation. :)
- j_baker 16y ago"one can compute with Lisp programs present in the machine without parsing" Correct me if I'm wrong, but don't you still have to parse Lisp code? Granted, it may be a very simple and primitive type of parsing, but parsing nonetheless.
- zachbeane 16y agoYou have to parse Lisp programs that are stored in a string or a file. You can make new Lisp programs from objects that have never been in a file.
- kragen 16y agoYou don't have to write a parser because it's already built into your Lisp system in a way you can use.
- j_baker 16y agoWell yes, but I was making the assumption that you were writing the Lisp system. I suppose it makes sense that you don't have to parse it if you're using the Lisp system. :-)
- burke 16y agoI assume this is referring to the ability to build up a list of arbitrary data in memory, then execute it. In most languages, you'd parse some string to an AST, but in lisp, your fundamental data structure is essentially the same as the AST.
- pjscott 16y agoThe other major characteristic of Lisp is that the mapping between programs and data is trivial, which tends to lead to a lot of parentheses. I think these two characteristics are a decent definition of what it means for a language to be a Lisp.