help-gnu-emacs
[Top][All Lists]
Advanced

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

why not "stripes" in: (let ((zebra 'stripes) ... ; strings vs symbols?


From: Gregor Zattler
Subject: why not "stripes" in: (let ((zebra 'stripes) ... ; strings vs symbols?
Date: Sun, 29 Dec 2013 15:23:32 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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?

Thanks, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



reply via email to

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