eq? and eqv?
that is a lot of operators, when C/C++ gets away with just ==
Name:
Anonymous2013-07-07 1:54
>>4
C++ gets away with just ==, which can be overloaded. C is just stuck with eqv?, that is, physical, character, and numerical equality for its primitive types. equal? is a different beast, though.
A bit of trivia: the eqv? and eq? thing seems it was a tipping point to gain support of some conditional votes for ratification, something about procedural equivalence semantics on eq?/eqv?, the mailing list had a long discussion about it, even the Sussman himself chimed in on this on the mailing list so I guess it was significant, they had set their bar high at something like 70% approval for ratification. The 30% that opposed ratification included Racket people, some of the key R6RS people didn't seem to have bothered voting at all.
>>14
You're butthurt. So I conclude my guess was correct.
Name:
Anonymous2013-07-07 18:18
>>9
eq? compares the addresses of two objects. eqv? compares the values. While C uses the same operator for both comparisons, it requires different syntax.
#include <stdio.h>
int main()
{
int x;
int y;
x = y = 42;
printf("(eq? x y) => %s\n", &x == &y ? "true" : "false");
printf("(eqv? x y) => %s\n", x == y ? "true" : "false");
return 0;
}
Output: (eq? p q) => false
(eqv? p q) => true
So even in C, x and y are both similar and different at the same time. They require two different kinds of comparisons.
>>15
Hey gro, I've heard of this really cool board. Click here: http://boards.4chan.org/g/ . It's great, I get to make guesses all day about things I don't understand and not get called out on it! Let's go together right now!
Name:
Anonymous2013-07-07 18:24
>>16 eq? compares the addresses of two objects.
That is an abstraction leak, because addresses are implementation detail and shouldnt appear above operating system and compiler level.
>>17
Just read the K&R book and stop pretending that your little scheme is something special, while scheme is just a half-assed scripting language, written using Flex++ and Bison.
>>18
It's usually defined as identity quality or something along those lines. Again you're wrong, and again you're a mental midget. Maybe you should stick to scrubbing toilets..
>>21
If you knew anything about scheme you would know you don't need Bison at all gro. Even further, if you knew anything about compilers, you would have heard of bootstrapping. Again, you're an idiot. And again, you don't know anything beyond the compiler class you're taking right now. Maybe you should get back to your homework before you drop out and end up flipping burgers for a living.
Name:
Anonymous2013-07-07 21:23
This thrad \\\ confirmas SChEME >>>> undefined shit