Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List and cons equality broken #2

Open
alandipert opened this issue Oct 23, 2011 · 2 comments
Open

List and cons equality broken #2

alandipert opened this issue Oct 23, 2011 · 2 comments
Assignees
Labels

Comments

@alandipert
Copy link
Member

Equality comparison of lists and conses seems to be broken:

=> (eq '(1 2 3) '(1 2 4))
true
=> (eq (cons 1 2) (cons 1 3))
true
@ghost ghost assigned catharinejm Oct 23, 2011
@catharinejm
Copy link
Contributor

Multiple-valued eq is broken too:

=> (eq 1 1 2)
true

I think both can be fixed at once.

@catharinejm
Copy link
Contributor

So... I'm thinking that #eq should only be true if the objects' exist in the same memory locations. #equal (or something, maybe #=) could do value comparisons.

Integers and symbols should still work as expected, so long as the environment implementation works and doesn't create dupes... We may need to included arbitrary quoted forms among those that get hashed and only created once to match this behavior: http://www.lispworks.com/documentation/HyperSpec/Body/f_eq.htm ...but it's not that important right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants