<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>You may also consider:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>(define a (box 1))<BR>(define b (box
1))<BR>(eqv? a b) ;--> #f because a and b are two different boxes (see
below)<BR>(equal? a b) ;--> #t because boxes a and b have the same
content.<BR>(set-box! b 2) ; this does not affect box a!<BR>(equal? a b) ;-->
#f because now the boxes have different contents.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>There are different meanings for the words
"the same". Two of them are:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>1: The same content (recursively without
being trapped by circular constructs) This is what equal? does (approximately)
Because equal? must recur on the structure of the object, it is slower than
eqv?.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>2: The same in the sense that if the
objects are mutable, changing one also changes the other. This is what eqv?
does. This means that for objects like boxes, (mutable) lists and vectors, eqv?
only has to look whether or not the two arguments point to the same place
in storage.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>When comparing things like numbers and
symbols, equal? and eqv? yield the same results and you probably wont notice any
difference in speed.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Jos</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=beratn@gmail.com href="mailto:beratn@gmail.com">emre berat
nebioğlu</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=plt-scheme@list.cs.brown.edu
href="mailto:plt-scheme@list.cs.brown.edu">plt-scheme@list.cs.brown.edu</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, March 01, 2009 8:15
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [plt-scheme] eqv? equal?</DIV>
<DIV><BR></DIV>
<P>Sorry for this newbie question.But i wonder so much about eqv? and
equal?.In the some discussin that passes on ffreenode #scheme.I see some
sentence which is "eqv? is faster than equal? in comparison.So i thought eqv?
and equal? returns boolean thing #t or #f right ? So why?</P>
<P>In that point,i have three question about that.</P>
<P>what is the thing that makes eqv? faster than equal?.<BR></P>
<P>which one is more powerful on programming ?</P>
<P>What is the reason that equal? still be used ? If eqv? is faster than
equal?.</P>
<P>Regards.</P>
<P>
<HR>
<P></P>_________________________________________________<BR> For
list-related administrative tasks:<BR>
http://list.cs.brown.edu/mailman/listinfo/plt-scheme<BR></BLOCKQUOTE></BODY></HTML>