From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: why not "stripes" in: (let ((zebra 'stripes) ... ; strings vs symbols? Date: Mon, 30 Dec 2013 10:27:01 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1388417417 10757 80.91.229.3 (30 Dec 2013 15:30:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Dec 2013 15:30:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 30 16:30:24 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VxenP-000214-Kq for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 16:30:23 +0100 Original-Received: from localhost ([::1]:58698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxenO-0001HP-Q5 for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 10:30:22 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="30613"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186mOLaFxit1JgNSkCKxJpK" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:gIucPH+ZjEGPv35TH5fzSErDEKQ= Original-Xref: usenet.stanford.edu gnu.emacs.help:202930 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95199 Archived-At: In article , Gregor Zattler wrote: > Dear emacsophiles, > > ATM i read "An Introduction to Programming in Emacs Lisp". In > the section where the let function is explained in detail the > author, Robert J. Chassell, uses this "silly" example: > > (let ((zebra 'stripes) > (tiger 'fierce)) > (message "One kind of animal has %s and another is %s." > zebra tiger)) > > which when evaluated produces "One kind of animal has stripes and > another is fierce." as output. > > The thing which makes me wonder is why he uses 'stripes instead > of "stripes" in this example. In the output of the message > function it makes no difference but to me it seems more natural > to use strings here since they are part of a string in the output... It may be a (very) old habit. Early versions of Lisp didn't have strings. To do what we do now with strings, they would typically use a symbols whose print-name is the string, or a list of single-character symbols (depending on whether they needed to refer to the string as a whole, or needed to extra substrings from it). -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***