From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: conditionals in elisp
Date: Wed, 28 Oct 2009 15:05:35 +0100 [thread overview]
Message-ID: <87my3bvck0.fsf@lola.goethe.zz> (raw)
In-Reply-To: 8763a0tu93.fsf@galatea.local
pjb@informatimago.com (Pascal J. Bourguignon) writes:
> Ok. It's quite simple really.
> Here the 5-minute all you need to know about lisp:
>
>
> There are two kinds of data:
>
> - atoms, and
> - lists.
Actually, conses.
> Atoms are numbers of various sort such as: 123 1.23 1.2e.3, vectors
> such as [1 2 3], strings such as "abc", and other kind of objects such
> as functions, predefined data structures (eg. hash-tables), or user
> defined structures or objects, and symbols such as: foo print if
> what-a-nice-day, +, -, etc, that are used to name the various things
> such as variables or functions. (Symbol can contain mostly any
> character that wouldn't be interpreted as another kind of atom or
> list, including spaces (just escape them with \)).
You forgot the atom nil which is also a list, though not a cons.
> Lists are sequences of data enclosed in parentheses:
>
> (a list containing only symbols)
> (a list containing (a sub list))
> (1 list containing 2 numbers and a "string")
Lists are nil or a cons... Data enclosed in parentheses is a shortcut
for a certain kind of conses.
(cons 1 (cons 2 (cons 3 nil)))
is short for (list 1 2 3).
> All the rest is rather accidental, it could be different, and it would
> still be lisp. It may change from one kind of lisp to another too
> (emacs lisp, Common Lisp, ISO-Lisp, Scheme, and older variants).
Scheme is quite different: in Lisp, a symbol has a name, a property
list, a value cell, a function cell. In Scheme, there are just name and
value cell, and I am not sure that the name leads as much a life of its
own as in Lisp.
--
David Kastrup
next prev parent reply other threads:[~2009-10-28 14:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.9533.1256602126.2239.help-gnu-emacs@gnu.org>
2009-10-27 0:19 ` conditionals in elisp Pascal J. Bourguignon
2009-10-27 2:52 ` LanX
2009-10-27 10:36 ` Pascal J. Bourguignon
2009-10-27 12:09 ` Richard Riley
2009-10-27 17:03 ` Sean Sieger
2009-10-28 12:07 ` Richard Riley
[not found] ` <mailman.9555.1256645401.2239.help-gnu-emacs@gnu.org>
2009-10-27 12:31 ` Pascal J. Bourguignon
2009-10-27 13:02 ` Richard Riley
[not found] ` <mailman.9557.1256648714.2239.help-gnu-emacs@gnu.org>
2009-10-27 16:04 ` Pascal J. Bourguignon
2009-10-27 17:26 ` Harry Putnam
[not found] ` <mailman.9572.1256664440.2239.help-gnu-emacs@gnu.org>
2009-10-27 18:37 ` Pascal J. Bourguignon
2009-10-27 19:40 ` Harry Putnam
[not found] ` <mailman.9577.1256672457.2239.help-gnu-emacs@gnu.org>
2009-10-27 21:14 ` Pascal J. Bourguignon
2009-10-28 14:05 ` David Kastrup [this message]
2009-10-28 15:55 ` Harry Putnam
2009-10-28 17:45 ` Pascal J. Bourguignon
2009-10-27 0:08 Harry Putnam
2009-10-27 0:25 ` Richard Riley
2009-10-27 1:03 ` Drew Adams
2009-10-27 5:33 ` Harry Putnam
2009-10-27 7:37 ` Drew Adams
2009-10-28 9:10 ` Thien-Thi Nguyen
2009-10-28 14:03 ` Drew Adams
[not found] ` <mailman.9621.1256738653.2239.help-gnu-emacs@gnu.org>
2009-10-28 15:42 ` LanX
2009-10-28 20:42 ` Harry Putnam
2009-10-28 16:19 ` Harry Putnam
[not found] ` <mailman.9630.1256746811.2239.help-gnu-emacs@gnu.org>
2009-11-02 19:31 ` Joseph Brenner
2009-10-27 5:50 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87my3bvck0.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.