From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rustom Mody Newsgroups: gmane.emacs.help Subject: Re: why not "stripes" in: (let ((zebra 'stripes) ... ; strings vs symbols? Date: Mon, 30 Dec 2013 22:16:49 +0530 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1388422040 28834 80.91.229.3 (30 Dec 2013 16:47:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Dec 2013 16:47:20 +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 17:47:28 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 1Vxfzw-00060o-0G for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 17:47:24 +0100 Original-Received: from localhost ([::1]:58919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vxfzv-0003XM-Jj for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Dec 2013 11:47:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vxfzj-0003XH-Rn for help-gnu-emacs@gnu.org; Mon, 30 Dec 2013 11:47:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vxfzi-00009R-M9 for help-gnu-emacs@gnu.org; Mon, 30 Dec 2013 11:47:11 -0500 Original-Received: from mail-pb0-x230.google.com ([2607:f8b0:400e:c01::230]:59216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vxfzi-00009K-Eo for help-gnu-emacs@gnu.org; Mon, 30 Dec 2013 11:47:10 -0500 Original-Received: by mail-pb0-f48.google.com with SMTP id md12so11749372pbc.35 for ; Mon, 30 Dec 2013 08:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=ChrQcRCNleNwWJGykUAGBUxF4mKcSIQjRVAc8Efdcvk=; b=AFW/S2WdFK3WsUtVhukB2GBUygWOHi47jtFkl/J+IHjGrP5rGZG4QfPeNq5F4pSs1l eqBxCg4Los4w01AXtUUdpoeaF0FR7qtutoXfJrg73TZF50cClaLFmQPu4c9/+EwD2TRM h0q6DMvnsLXO8CTRd/5cwLs/PeSX7SCVT8FE4IcRQwpRu1CXGwvy4VNhZKnGV2xooUaa lYNkPwsBQygf7nC3fnINDW1PvVL6bEXOP1i1lswO7FDxGaMfUlKgF0NeUVLEmNJC1fUu 0LApMBPI/ki+mGYFMk9oo50GQYMFxa7yhlCz2nmDWGWtIH1LcQBhhewCkfzW1x2V6ows 5dgQ== X-Received: by 10.68.91.3 with SMTP id ca3mr69375325pbb.20.1388422029479; Mon, 30 Dec 2013 08:47:09 -0800 (PST) Original-Received: by 10.68.99.35 with HTTP; Mon, 30 Dec 2013 08:46:49 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::230 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:95200 Archived-At: On Sunday, December 29, 2013 7:53:32 PM UTC+5:30, 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... > I do not really understand how the 'stripes are different > to "stripes". Isn't 'stripes a notation for the symbol > stripes? This would mean there is the notion of a symbol which > is bound to noting? > Could somebody please enlighten me as to what the differences > between "stripes" and 'stripes are > and > in which cases which notation is more useful/natural? In http://www.catb.org/esr/faqs/hacker-howto.html Eric Raymond says: LISP is worth learning for a different reason =97 the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot. So... You are almost there... at the Zen of Lisp! And getting lisp symbols is an important part of that Lisp is a completely bizarre language because unlike most others its primary data structure -- S-exp -- is identical to that used for (lisp) co= de. Very key to that is that symbols do double duty - they are variables like in other languages - they are data like strings in other languages For more on this look up homoiconicity Also Ive a blog post on that http://blog.languager.org/2013/08/applying-si-on-sicp.html But for that you need to know scheme