Common Lisp versus Emacs Lisp

As a user of both Elisp and Common Lisp I sometimes have a hard time remembering the small differences. Many of these are “hidden” in the sense that identically named functions behave differently. One such example is that functions such as assoc and member behave differently because Elisp uses equal as the predicate whereas eql is used by default in CL.

Jisang Yoo has published a lengthy post on some of the differences between the two Lisps. It's not encyclopedic but it does cover the most important differences and the ones that are apt to bite the unwary practitioner.

He also covers the cl-lib package, which is the new CL compatibility library for Elisp. One nice touch is that he shows how to programmatically list all the cl-lib functions with an indication of whether or not they have a built-in version.

Some differences are trivial, defconst versus defconstant for example, while others, like the difference in member are subtle and hidden. Even if you're experienced in both languages, you may find some differences you didn't know about. This is a great post and well worth the time it takes to read it. You'll also learn an interesting fact about the Korean language.

This entry was posted in General and tagged , , , . Bookmark the permalink.