[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Emacs Lisp for script writing

From: Tim X
Subject: Re: Using Emacs Lisp for script writing
Date: Tue, 22 Dec 2009 22:26:05 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Cecil Westerhof <address@hidden> writes:

> Tim X <address@hidden> writes:
> I think I will try to write the scripts only in CL. In that way it is
> easier to share. Otherwise people need to have a CL implementation and
> Emacs on their system. When there is a situation that an elisp version
> is a lot more efficient -because of the optimisation for text- I could
> create two versions. But elisp is of course very handy for extending the
> functionality of Emacs. :-D

I think that is a wise way to go. My apologies if I sounded too
'preachy' or critical of what you are doing. My main motivation was to
highlight that at this stage, you need to be very careful about
assessing efficiency and performance. Lisp dialects are somewhat
notorious for being easy to learn and very hard to master.  CL in
particular can be very daunting at first because it is quite a large
language and the hyperspec takes considerable time to get comfortable
with. For me, the most difficult part has been identifying/finding the
functions you are after. The terminology can seem unfamiliar and
searching the hyperspec index can be frustrating when you don't know the
right terminology to use. I frequently spend considerable time searching
for something which I know will be there, but not having the right
terminology, I can't find it. For this reason, I've found other
resources, such as Practical Common Lisp, CLTL2 and other books really
useful. I tend to skim them, find the general area and terms I need and
then go back to the hyperspec to get the precise definition/usage. 

from experience, I would say your decision to focus on CL for now is a
good one. I've seen a number of posts from people who have managed to
get themselves really confused because of switching between different
dialects. I have managed to get myself confused as well by doing this.
It is best to concentrate on one until you are quite comfortable and
familiar with it and then move on to the next dialect. Apart from
reducing the potential for confusion, you can also appreciate the
pros/cons of the different dialects better. Like many others, myself
included, you will likely find elisp a little limiting after having
worked with CL as there are a number of features CL has that would be
nice to have in elisp (though I still find elisp and emacs the best
extensible editor and kitchen sink available!)

good luck


P.S. Another advantage to CL is that if you plan to share/distribute
some of what you are doing, you can compile it to native code. This
means people don't even have to know you wrote it in lisp. This can help
overcome the considerable FUD regarding CL that exists out there. 

PPS. Make sure you do put the effort into getting SLIME working. Apart
from making you more productive in CL, I think you will find the whole
development process very enlightening. This is what I love the most
about CL. Instead of the time wasting edit -> compile -> debug ->
edit ->... loop, you have a much tighter code -> evaluate -> refine loop
that encourages small incremental change and practices like unit testing
and test driven development. I also find it much easier to 'explore'
solutions. In general, a whole development experience that is more rewarding
and for me at least, produces better code. It has also had positive
benefits on the rest of my coding in other languages. In general, I
think it has made me a better programmer. 

tcross (at) rapttech dot com dot au

reply via email to

[Prev in Thread] Current Thread [Next in Thread]