From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: conditionals in elisp Date: Wed, 28 Oct 2009 18:45:54 +0100 Organization: Informatimago Message-ID: <878wevqunh.fsf@galatea.local> References: <87aazdunrb.fsf@galatea.local> <87skd5t3vp.fsf@galatea.local> <87eioou1im.fsf@galatea.local> <8763a0tu93.fsf@galatea.local> <87my3bvck0.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256756752 11004 80.91.229.12 (28 Oct 2009 19:05:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2009 19:05:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 28 20:05:45 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N3Dq2-0001xE-A7 for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2009 20:05:44 +0100 Original-Received: from localhost ([127.0.0.1]:49233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3Dq1-00056c-9h for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2009 15:05:41 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 62 Original-X-Trace: individual.net s1hdHMcGWEgmFTApdfy+Ig5F5HZ78+uN2CDhkh0SWjvzirNydw Cancel-Lock: sha1:ZmQ4ZTJkZDNhYWMwOTQyNTkwYjg1OTUyMmQxZTQ1M2YzM2NkYmYzNA== sha1:zRn6rzQOcWfT94NGhWOs6+Ub3ZA= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) Original-Xref: news.stanford.edu gnu.emacs.help:174234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69316 Archived-At: David Kastrup writes: > 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. Right. Oops! More than five minutes! >> 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. Way more than five minutes! > (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. No, in scheme (r5rs), symbols don't even have a value (this would be useless, since there is only lexical bindings in scheme). But now we need one hour to explain... -- __Pascal Bourguignon__