[Top][All Lists]

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

Re: What makes elisp fun ?

From: Emanuel Berg
Subject: Re: What makes elisp fun ?
Date: Mon, 22 May 2017 23:36:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Jean-Christophe Helary wrote:

> Chassell's introduction really does not
> manage to make the reader enthusiastic about
> programming in elisp. Maybe it's because it
> was written when people really had to learn
> *everything* about programming concepts since
> the internet was not so widely spread at
> the time.

Most books on programming aren't that fun.

Either the book tries to teach programming in
general, and the particular langauge is just
the way to do that. Those books are very
tedious to read for the dirty old pros...

On the other end of the spectrum, books are
just references (or close to it) that lists the
whole language. Those books are not exactly for
reading and they can be of dubious value even
to experience programmers which are new to the
particular language, because even tho they
understand the syntax and purpose of the
functions etc., there is no mention how to get
the tool-chain going for the
development process.

The best books on computers IMHO are about
*culture*, e.g. this one on UNIX:

      title      = {A Quarter Century of UNIX},
      author     = {Peter Salus},
      publisher  = {Addison-Wesley},
      year       = 1994,
      ISBN       = 0201547775,

> There are countless people on the web who are
> super excited about Emacs and modes and how
> all that allows them to be so much better at
> what they do

Experienced Emacs user are super productive
using Emacs for whatever they do. However, this
often mean that they just do more things, so
the number of computer hours isn't reduced.
On the contrary, most often...

> but most of the things I read about elisp are
> "elisp is what you have to go through to
> write your .emacs file"... I have yet to find
> just *one* document about elisp that shows
> some real enthusiasm

Perhaps it is a difficult to convey in a book
chapter or web site document.

> I've read (or started reading) a number of
> books on Lisp and they pretty much all put
> the emphasis on how simple the syntax is, and
> on how macros are the defining difference
> between lisp and all the other languages.

Macros (N.B. not keyboard macros in Emacs) is
one feature - Lisp, the programmable
programming language. But it isn't the
only one.

As for me, the syntax is one thing with
parenthesis and no semi-colons at the end
of statements.

Also I like the tradition of long and elaborate
names which describe function and variables,
compared to the cryptic names people (even I)
use with C and C++.

Not being explicit about types with variables
and function arguments is another very relaxing
thing. Not caring about namespaces. No pointers
or explicit memory management. Obviously I'm
not an OO guy, and I know there are Lispy
implementations, but I do use it with C++ and
not having classes, objects, constructors, or
any of that is a bliss.

Also the freedom of Lisp where everything is
data, and data is everything. You can send
a function as an argument to a function, and
have that function execute the argument
function with the other function's definition
as data! It is just insane how easy it is to do
compared to other languages.

> On that note, the macro chapter in the
> reference does not really manage to show
> users how Lisp macros are so different from
> any other kind of macro system. When you read
> Graham's Ansi Common Lisp, you get right away
> (p.11) that macros are *the* defining
> difference between Lisp and other languages.
> On Lisp, or more recently Let Over Lambda and
> even Practical Common Lisp show you right
> away how important macros are.

Macros are difficult to maintain and debug
compared to regular Lisp. Sometimes they are
very useful tho but I wouldn't base my entire
game on them.

> So, besides for the fact that elisp is the
> Emacs extension language, what makes you
> enthusiastic about it and want to program in
> it? What makes elisp fun for you ?

The best thing in terms of Emacs is that you
can just write a couple of lines and evaluate
the form (defun or whatever) and then have it
instantly up and running. No compilation phase
in between to get you off your workflow.
You are inside Emacs all the while when you
make it work better, for you.

I mentioned LaTeX compilation in another post
(and the UNIX book reference above is
Biblatex). I don't know if you are familiar
with the LaTeX workflow? If so, the Elisp/Emacs
workflow is exactly like that, only the other
way around :)

BTW, here are two good books on Lisp. The first
one is very good what I can remember:

      title      = {Land of Lisp},
      author     = {Conrad Barski},
      publisher  = {No Starch},
      year       = 2010,
      ISBN       = 1593272812,

      author     = {Robert Wilensky},
      ISBN       = 0393954420,
      publisher  = {Norton},
      title      = {LISPcraft},
      year       = 1984

underground experts united

reply via email to

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