[Top][All Lists]

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

RE: Several beginner-questions

From: Drew Adams
Subject: RE: Several beginner-questions
Date: Wed, 27 Jul 2011 06:57:25 -0700

> > [...] I'm fairly new to Emacs, and Lisp is also somewhat a 
> > mistery for me (although I am familiar with the concepts
> > of functional programming in general).
> Emacs Lisp, and other popular Lisps as well, are multi-paradigm
> languages. They support many paradigms but do not force any 
> of them. For example, imperative and functional programming is
> supported. It's a common myth that Lisps are (purely) functional
> languages. They are not.
> In my experience the first big difference for a Lisp newbie is that
> there are no separate statements and expressions; there are only
> expressions. Another thing to realize is that Lisp code is 
> actually Lisp data (trees of cons cells).

Just to add a little to what Teemu noted (which is correct):

1. Learn about Lisp symbols and conses (list structure). If you understand those
two you'll get through 80% of the learning gotchas. And no, don't suppose that
you understand Lisp conses because you understand lists in Haskell or Prolog.
And yes, there is more to symbols than meets the eye.

2. You're better off forgetting altogether about Lisp being a functional
language. In the modern (since the 1970s) sense, a functional language is
typically pure (no side effects, referentially transparent), typically lazy, and
typically cleanly higher order. Lisp is not lambda calculus.

Lisp (including Scheme) is imperative through and through, regardless of what
anyone might say about being able to program functionally using a subset of it.

Lisp is to a functional language what Mock Lisp was to Lisp: it might look like
it, and it might occasionally quack like it, but it's not the same duck at all.

reply via email to

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