From: Ronald
Subject: Why the same result?
Date: 
Message-ID: <emqdig$843$1@news.yaako.com>
(cons 1 '2)
(cons 1 2)

What's the semantic of '2 and 2? 

From: ·····@evins.net
Subject: Re: Why the same result?
Date: 
Message-ID: <1167113034.450305.188260@48g2000cwx.googlegroups.com>
Ronald wrote:
> (cons 1 '2)
> (cons 1 2)
>
> What's the semantic of '2 and 2?

2 evaluates to itself:

2 -> 2

(quote anything) returns anything, so

(quote 2) -> 2
From: Sam Steingold
Subject: Re: Why the same result?
Date: 
Message-ID: <m3r6ungpa3.fsf@loiso.podval.org>
> * Ronald <·········@163.pbz> [2006-12-26 13:56:29 +0800]:
>
> (cons 1 '2)
> (cons 1 2)
>
> What's the semantic of '2 and 2? 

'2 means (QUOTE 2), i.e., "do not evaluate 2".
2 means evaluate 2. 2 is self-evaluating, it evaluates to itself, so it
is functionally identical to '2.
the difference is stylistic.

http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-3.html
http://www.lisp.org/HyperSpec/Body/glo_s.html#self-evaluating_object

-- 
Sam Steingold (http://sds.podval.org/) on Fedora Core release 6 (Zod)
http://palestinefacts.org http://pmw.org.il http://openvotingconsortium.org
http://mideasttruth.com http://ffii.org http://israelunderattack.slide.com
The world is coming to an end.  Please log off.