
Ask HN: What is so great about Lisp that makes Emacs powerful? - anuragpeshne
I&#x27;m new to Emacs and I&#x27;ve read at several places that Emacs is a lisp machine and that Lisp is the main reason behind its power. There are several other text editors which are scriptable, then what is so special about Lisp and Emacs.<p>P.S: I&#x27;m a avid Vim user and I have written couple of extensions for it. It may be easier to understand if the answer provides analogies to Vim and Vim script.
======
bjourne
Emacs is an open/unsafe architecture. Whatever I write in Lisp in my .emacs
file becomes part of my implementation. It's on the exact same level as the
Lisp code rms writes which is bundled with the releases.

Vim scripts like Chromium and Firefox plugins are inferior to their host
processes. They can only modify the application behavior through a set of
(supposedly) safe api calls. Since Elisp packages aren't second class
citizens, like Vim scripts, it changes everything.

------
tptacek
Extensibility is the reason for Emacs' power. Lisp is just an implementation
detail. You could make an equivalently powerful editor in any high-level
language.

There are other extensible editors, but the line between Emacs' kernel and its
extensions is drawn at a different place in Emacs than in any other popular
editor. It is more likely that any given feature you're interacting with in
Emacs is provided by its extension code than it would be in another editor.

Probably more important is the benefit Emacs gets from being one of the two
major Unix editor projects. It has an immense community and user base.

------
informatimago
Lisp is a great dynamic programming language.

One particular feature that makes it really great for emacs (and a lot of
other applications), is that you can define and COMPILE new functions, or even
REDEFINE old functions.

Nowadays a lot of dynamic languages have followed the lisp model. They didn't
exist when GNU emacs development started.

In the context of emacs, it allows you to edit a new command, and have the
lisp in emacs evaluate it (define it) and compile it, hence integrating into
emacs code, and making it available for further use. Or indeed, since most of
emacs is also implemented in lisp, you can redefine any emacs function the
same way, and have it taken into account immediately.

So basically, you are not "extending" emacs so much as you are just modifying
it.

Also, lisp has alot of nice and fun features, like lisp macros, first class
functions (and now closures), allowing for high order functions, which let you
create abstractions easily when programming. Contrarily to most other custom
application specific scripting language, lisp is a real algorithmic
programming language without artificial limitations.

------
brudgers
In my opinion, it's not Lisp that makes Emacs powerful. It's a pluggable
architecture evolved over about four decades that makes it powerful. Lisp is
an implementation detail. Eclipse has a similar architecture and a somewhat
similar trajectory.

Emacs and Eclipse have an architecture that allows the creation of
applications on top of them that have little to do with what one would call
"their base configurations". They allow vertical adaptation to new purposes.
Vim is more or less limited to extension horizontally and that's in keeping
with it's philosophy of trying to do only one thing and a lightweight
footprint.

It's not all sunshine and rainbows. The architecture of Emacs has a dependency
on eLisp and my understanding is the dependency is one of the things that has
inhibited a move to multi-threading. That processor power has mostly kept the
issue at bay, speaks to Emacs philosophy and these days for all its bloat,
Emacs would have to be classified as relatively lightweight: the Windows
install for 24.5 is a 50mb zip.

------
e19293001
There is no ending in customizing emacs because of Lisp.

For me, org-mode inside emacs makes it more powerful. Org-mode and other
extensions are written in Lisp.

------
lispm
GNU Emacs is not a Lisp Machine. It's an editor written in C/Lisp and
extensible in Lisp, that's all.

