I want to learn the lisp language, since my editor is emacs, I prefer emacs lisp.
Can anyone give me some suggestions to learn lisp, emacs lisp, or common lisp?
What are the major differences between those two?
There's quite a bit of crossover, especially at the beginner level, so whichever you start with will mostly transfer to the other.
Some of the major differences:
elisp has traditionally used dynamic scoping rules; Common Lisp uses lexical scoping rules. With dynamic scoping, a function can access local variables declared in calling functions and has generally fallen out of favor. Emacs has a
lexical-letform that simulates lexical scoping and recent versions of emacs allow optional lexical scoping on a function-by-function basis.elisp doesn't have closures, which makes composing functions and currying difficult. There's a
apply-partiallyfunction that works similarly to currying. Note that thelexical-letform introduced in Emacs 24 makes it possible to produce closures via lexical scoping.Much of the Common Lisp library that has been built up over time isn't available in elisp. A subset is provided by the elisp
clpackageelisp doesn't do tail-call optimization.
These Emacs-Wiki pages offer some info about the relation between the two Lisps and their differences:
来源:https://stackoverflow.com/questions/8433474/what-are-the-major-differences-between-emacs-lisp-and-common-lisp