Re: Are `eqv?' and `eq?' the same?

2013-08-25 Thread Ian Price
Alexandru Cojocaru writes: >     `eq?' tests just for the same object (essentially a pointer > comparison) >     `eqv?' extends `eq?' to look at the value of numbers and > characters. > > this is what I get: > >     scheme@(guile-user)> (eq? 3 (+ 1 2)) >     $1 = #t > > is this behavior intention

Re: Are `eqv?' and `eq?' the same?

2013-08-25 Thread Pascal J. Bourguignon
Alexandru Cojocaru writes: > Hi, > > from the GUILE manual [0]: > >     `eq?' tests just for the same object (essentially a pointer > comparison) >     `eqv?' extends `eq?' to look at the value of numbers and > characters. > > this is what I get: > >     scheme@(guile-user)> (eq? 3 (+ 1 2)) >    

Re: Are `eqv?' and `eq?' the same?

2013-08-25 Thread Noah Lavine
Hello, eq? and eqv? are sort of a funny pair. eqv? actually has sensible semantics - if two things are eqv?, then a normal scheme program should never notice the difference between them (they are operationally equivalent). eq? is defined not in terms of Scheme, but in terms of Scheme's implementat

Are `eqv?' and `eq?' the same?

2013-08-25 Thread Alexandru Cojocaru
|Hi, from the GUILE manual [0]:| || `eq?|' tests just for the same object (essentially a pointer comparison) `eqv?'| extends |`eq?'| to look at the value of numbers and characters. this is what I get: scheme@(guile-user)> (eq? 3 (+ 1 2)) $1 = #t is this behavior intentional o