I see. Well, rather confusing on the part of the standard. I don't see the point in in this behaviour, but I guess this is the way the satandard goes.
Thanks a lot for your posts.
Pep.
Search found 4 matches
- Wed Jul 27, 2011 8:35 am
- Forum: Common Lisp
- Topic: EQ newbie question
- Replies: 11
- Views: 12204
- Wed Jul 27, 2011 6:54 am
- Forum: Common Lisp
- Topic: EQ newbie question
- Replies: 11
- Views: 12204
Re: EQ newbie question
So, if I understand well, that means that when the bit pattern and the type are the same, then EQ returns T, even if the bit pattern represents a number and not an address. However, that is in contradiction with Ramarren's post, as he says: Since Common Lisp is call-by-value (even if the majority of...
- Wed Jul 27, 2011 6:12 am
- Forum: Common Lisp
- Topic: EQ newbie question
- Replies: 11
- Views: 12204
Re: EQ newbie question
Thanks for the reply, it makes me understand how it works. As for the piece of code: (setq a 5) (setq b 5) (eq a b) T It makes sense that it returns true if: 1. This particular implementation stores references, and not the pattern '5'. 2. The implementation is using the very same memory address for ...
- Wed Jul 27, 2011 1:45 am
- Forum: Common Lisp
- Topic: EQ newbie question
- Replies: 11
- Views: 12204
EQ newbie question
I've just started learning lisp, and I've encountered my first doubt: it's regarding EQ. I undertand that, as lisp implementations have the freedom to make copies of numbers and characters at any time, you cannot assume, for instance, that (eq 3 3) will be true, as yo cannot assume the first object ...