2009-02-06

emacs lisp vs common lisp

2009-02-06

On Feb 6, 5:55 am, "jos...@corporate-world.lisp.de" wrote:
> On 6 Feb., 14:18,XahLee wrote:
>
> ...
>
> > If emacs lisp is behind the times in many ways, which is true, Common
> > Lisp is also behind the times in many ways.
>
> How would you know? You never have read a book or manual about Common
> Lisp
> or one of its implementations.
>
> Emacs Lisp
>
> + dynamic scope
> + eval
> + simple compiler
> + simple data structures
>
> - no objects
> - no lexical binding
> - primitive compiler
> - mostly only available with Emacs
> - no threading
> - never modernized
> - no continuations
>
> Common Lisp
>
> + dynamic scope
> + lexical scope
> + eval
> + compile
> + objects (Common Lisp Object System)
> + sophisticated compilers available
> + threading with multicore-support available
> + can be used for scripting (CLISP)
> + can be used to write applications
> + several independent implementations
>
> - oldish standard
> - continuations only partially via libaries
>
> If you look around all educational resources (books, implementations)
> are around Scheme and Common Lisp. Emacs Lisp is mostly NOT
> used in schools or universities. The universities and schools
> that teach introductions to programming or computer science using some
> Lisp dialect are using mostly Scheme (some are using Logo).
> Universities are
> sometimes offering Common Lisp courses.

I fully agree with what you wrote above.

however, to put things in proper context, if the question we are asking is which lang to choose among lisp for a imperative programer, i think emacs lisp can easily be the right choice, for one simple reason: pracitcal utility.

You see, to a professional programer, who is studying lisp to learn some new language concept and aspects, elisp is of the most ulility because:

A: it has immediate practical utility. Most lispers use emacs and swear by emacs for its multitude of uses and extensibility, even if they program only in Common Lisp or Scheme Lisp.

B: emacs lisp, although technically is useful just within emacs and text processing, however, contain almost all the essential features and qualities of lisp that are not in imperative langs. Namely, nested paren syntax, symbols, lisp macros, functional programing.

Put in other words: if a industrial programer coming from C, Java, Perl, etc imperative or static langs want to learn lisp's concepts, he can learn basically all of it with the very simple and useful emacs lisp. If he is so hooked, he can then trivially extend his knowledge and start to learn one of Scheme lisp or Common lisp and start to write whatever real software he had in mind in these langs.

This is why, i recommend emacs lisp, among the 3 major lisps, for imperative programers who want to venture into lisp.

(for those unaware, there are also NewLisp, Clojure, Arc. Their number of users, and age of the lang, are roughly in that order given too.)

Now, if a imperative coder is wondering which lang he should learn outside of his meager C, C++, Java, Perl, type of imperative langs, for the purpose of enriching his knowledge in comp langs in some academic sense, then, i do not even recommend lisp. I recommend: OCaml, Mathematica, for examples.

all of us are busy, and all of us geeks always have aspiration to learn new langs, but not always follow thru. If a imperative programer tried to learn lisp for half a year in his spare time, then, whatever he has learned with emacs lisp remains quite useful in his programing career. But whatever he learned in Common or Scheme lisp would be rather find no where to go and be forgotten.

Xah
∑ http://xahlee.org/



--

2008

Xah wrote:
> you might be interested in learning emacs lisp. It is quite practical
> and captures basically all important concepts of Common Lisp.

On Dec 10, 10:22 am, "Alex Mizrahi" wrote:
> you do not consider lexical closures and CLOS being that important?

lexical closure and CLOS are not functional programing paradigms. In lisp, the predominant, convenient, paradigm of programing is functional. So, generally speaking, state-keeping features are not important or defining features of lisp.

also, consider the context, that the poster is learning lisp for educational purposes at this point, as opposed needing to use Common Lisp for immediate large project. So, i think my recommendation for emacs lisp for immediate practial usefulness and learning all major lisp concepts, is fitting.

Xah
∑ http://xahlee.org/

No comments:

Post a Comment