Re: What do we mean by "Identical" ?
- From: "Tayssir John Gabbour" <tayss_temp2@xxxxxxxxx>
- Date: 30 Oct 2005 04:02:32 -0800
newser.bbs@xxxxxxxxxxxxxxxxx wrote:
> Harald , I sincerely wish you have good time during your riding in the
> warm breeze.
> I think there is misunderstanding between us. I am not a pedagog. In
> fact , I have confessed that I am new to lisp.
>
> I believe that you are right that the arguments should be evaluated
> before the calling of the function , but this still makes me more and
> more confused . What do you think makes "eq" different from "eql"?
> Following those procedures you taught me , I can't tell "eq" apart from
> "eql".
>
> Again , in "Practical Common Lisp" , Peter tells us that "expression
> (eq 3 3) can legally evaluate to either true or false" . Following your
> procedures , I'm too foolish to see why it is possible for (eq 3 3 ) to
> evaluate to false.
>
> Many thanks if anyone can give me a hint !
Only because the spec says so: "numbers with the same value need not be
eq". If an implementation uses EQ to compare memory addresses, maybe
the two 3's are stored in different memory locations.
http://www.lisp.org/HyperSpec/Body/fun_eq.html
There are multiple equality operators in Common Lisp. After all, what
is the philosophical meaning of "equality"?
So:
(eq 3 3) is not always true, but might be.
http://www.lisp.org/HyperSpec/Body/fun_eq.html
(eql 3 3) is always true.
http://www.lisp.org/HyperSpec/Body/fun_eql.html#eql
(equal 3 3) is always true.
http://www.lisp.org/HyperSpec/Body/fun_equal.html#equal
(equalp 3 3) is always true.
http://www.lisp.org/HyperSpec/Body/fun_equalp.html#equalp
(= 3 3) is always true.
http://www.lisp.org/HyperSpec/Body/fun_eqcm_sleq__lteqcm_gteq.html#EQ
Tayssir
.
- References:
- What do we mean by "Identical" ?
- From: newser . bbs
- Re: What do we mean by "Identical" ?
- From: newser . bbs
- Re: What do we mean by "Identical" ?
- From: newser . bbs
- Re: What do we mean by "Identical" ?
- From: Harald Hanche-Olsen
- Re: What do we mean by "Identical" ?
- From: newser . bbs
- What do we mean by "Identical" ?
- Prev by Date: Re: Running Symbolics XL1201 Lisp Machine without remote login enabled....
- Next by Date: Re: Dictionary
- Previous by thread: Re: What do we mean by "Identical" ?
- Next by thread: Re: What do we mean by "Identical" ?
- Index(es):