views:

293

answers:

7

The last few months I've been using Emacs extensively as my main development environment and I've now come to a point at which I'd like to learn it's own Emacs Lisp to write my own little stuff for Emacs and extend it to my personal needs.

Having said that I've also wanted to learn Common Lisp for a while now, to play around with and explore a new language. My question is, where should I start from? Will Emacs Lisp give me the necessary knowledge to pick up Common Lisp later more easily or the other way round? I'm basically interested in the efficiency of each path so as to minimize the learning curve when I finally decide to move from one dialect to the other.

+1  A: 

I like these books:

Starkey
Thanks a lot but that doesn't really answer my question. Which way should I go EmacsLisp -> CommonLisp or vice versa?
serk01
+4  A: 

Start with Emacs Lisp (given that you seem to have already started customizing your emacs) - it seems to be more immediately useful for you.

Do keep in mind that there is quite a bit of difference between Emacs Lisp (there is a lot of buffer management stuff, especially in the code you're likely to see in the wild) and Common Lisp (more similar to a general purpose programming language), so which ever route you take, expect some amount of "wastage"

Rohith
That makes sense. I was also thinking that if I start with Emacs Lisp I will get more immediate satisfaction out of it as I will be actively enhancing my dev environment and seeing real results from what I've learned
serk01
+2  A: 

I assume you searched SO before posting and saw the questions "What's the best way to learn LISP?" and possibly "Tips for Learning Elisp". Those are two good starting points for how to learn either one.

As far as which one to learn first, it all depends on what you want to do. If you have an idea for a project that interests you, then use the appropriate lisp to solve that. For example, if you want to add/change some functionality in your development environment, use emacs lisp. Otherwise (if it's not editor related), use common lisp.

For me, it's all about finding a project that interests you, and using that to guide which language to use.

They're each close enough that becoming familiar with one will make using the other straight forward. Emacs lisp has a lot of domain specific features (buffers, regions, text properties, files, sub-processes, etc.), and common lisp has a wide varieties of libraries to use.

Trey Jackson
Yes I did search SO and found the posts you mentioned, but they weren't exactly related to my query. Based on your and Rohith's replies,I think I'm leaning towards going for Emacs Lisp first as it will be more directly useful to me.
serk01
A: 

I recommend that you start with EmacsLisp, as it will be more immediately useful as already stated.
And as soon as you get a good grasp on the peculiarities of the language, you could start usingeieio.

To quote the emacswiki, it is An implementation of the CommonLisp object orientation standard (CLOS) in EmacsLisp.

Best of both worlds !

julien
+1  A: 

I'd recommend you to start with Common Lisp first since it's much more general purpose than Emacs Lisp. Once you're acquainted with Common Lisp you'll have very little trouble picking up Emacs Lisp(it's a much simpler dialect of Lisp).

You might as why I'm suggesting to start from the "more difficult" language of the two and you'd be right to ask such a question. The answer is fairly simply - much of the stuff in Emacs Lisp are fairly tied down to Emacs and you might be missing part of the big picture if you start from there.

I personally started my journey towards Lisp with the excellent book "Practical Common Lisp" which others have already recommended. It got me hook to the lisp vision and ideas and once I understood Common Lisp it was fairly easy for me to start writing Emacs Lisp code right away. I'm not sure the journey would be as smooth in the opposite direction, but everything is subjective and matter of personal preferences.

Bozhidar Batsov
A: 

Probably learn both in parallel.

When learning Common Lisp I used exercises from the Structure and Interpretation of Computer Programs, which is in Scheme. This meant I was exposed to the differences between Scheme and Common Lisp early on. Similarly, learning emacs-lisp together with CL is perfectly feasible and may even help you understand scoping, since it differs between each.

justinhj
Personally, I hate trying to learn similar things in parallel. I get them mixed up.
David Thornley
A: 

This may be useful: a comparison of Common Lisp, Scheme, Clojure, and Emacs Lisp.

John D. Cook