On May 18, 2015, at 1:19 AM, Michael Tiedtke <michael.tied...@o2online.de> 
wrote:

> I'm new to Racket but even R5RS is rather clear about this issue:
> 
> (citation from doc/r5rs/r5rs-std/r5rs-Z-H-9.html)
>> (eq? 2 2)   ===>  unspecified

In Racket, (eq? 2 2) is specified as true.

It says here:
http://docs.racket-lang.org/reference/numbers.html

> A fixnum is an exact integer whose two’s complement representation fit into 
> 31 bits on a 32-bit platform or 63 bits on a 64-bit platform; furthermore, no 
> allocation is required when computing with fixnums. See also the 
> racket/fixnum module, below.
> 
> Two fixnums that are = are also the same according to eq?. Otherwise, the 
> result of eq?applied to two numbers is undefined, except that numbers 
> produced by the default reader in read-syntax mode are interned and therefore 
> eq? when they are eqv?.

And about symbols, they should always be eq? if they are interned, which they 
always are unless they are produced by a function like gensym or 
string->uninterned-symbol.  The symbol=? predicate uses eq? to compare the 
symbols.


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to