Just Enough Emacs Lisp

I suppose you could use Emacs without learning Emacs Lisp, but where’s the fun in that? You might as well use notepad++
These pages aren’t intended for people wanting to learn how program.  Emacs Lisp is not a good language for beginners: if you do want to learn to program, try Python.
These pages are suitable for newcomers to Emacs, however.


  1. David Wagle says:

    “Emacs Lisp is not a good language for beginners: if you do want to learn to program, try Python.”
    I’m wondering if you could expand on why you think that is the case? For years, MIT’s famed Introduction to Computing course used Scheme and the SICP text to teach programming basics.
    Lisp dialects are, imho, vastly superior to just about any other language for beginners because they have so little in the way of syntax. There really is nothing but s-expressions, lists and atoms. Given the near lack of syntax, beginners can easily focus on the logic and structure of the program.
    To my mind the real problem with using Lisp for beginners isn’t that the language isn’t suitable for beginners, but that the knowledge gained isn’t easily transferred to other popular languages. If you learn pascal, C, python, java or any other language in the Algol family tree, you can start programming in a related language with very little additional instruction.
    Can you expand on why you think it is not a good language for beginners?


    1. admin says:

      You make an excellent point, however someone learning programming at MIT is not a typical learner. A student there will (I hope) be used to thinking mathematically so, for example, it won’t be a huge jump for them to move from infix to prefix notation. A typical learner may still struggle with order of operation on expression such as (a^2 + b^2)^3
      Consider, say, 11 year old student, not too confident at maths and with little experience of algorithmic thinking. In my experience, students like this can readily understand lists of instructions, (see my post elsewhere on this site on dot and graphviz), their problems begin with nested expressions. A mathematically inclined person may be surprised at the difficulty some people have even with simple select statements. Lisp’s notation acts as a further barrier to comprehension. Compare the following Lisp expression to the near English of python…
      (if (> a 5)
      (setq a (+ b 7))
      (setq b (+ c 8)))
      (setq b 4))


  2. Jean-Christophe Helary says:

    The way elisp is generally introduced makes Lisp look difficult. The book used at MIT (SICP) is one of the most nicely written computer book and introduction to Lisp I’ve ever found. Just reading the first few pages convinces you that prefix notation is really not much. And the simplicity of the syntax is simply mind blowing, compared to anything else existing on computers.


    1. admin says:

      I’ve not read the book although I’m sure that what you say is true, it’s a very well written computer book.
      However, as I said in my comment above, the average MIT student is not the same as the average 11 year old student. Simplicity of syntax doesn’t help those who struggle to understand the underlying structures


Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s