Re: diff. betw. equal and eq on simbols
- From: Pascal Costanza <pc@xxxxxxxxx>
- Date: Mon, 31 Oct 2005 15:52:41 +0100
Russell McManus wrote:
Pascal Costanza <pc@xxxxxxxxx> writes:
If you use EQ you tell readers of your program that you don't expect to compare anything but just objects. If you use EQL you tell readers that you expect to also deal with numbers and characters. And so on. This will help readers of your code to make assumptions about the intent of the source code and ultimately to better understand it. If you always use the same generic operators (like EQUAL) the less information you reveal about your intentions.
I almost never use eq, and therefore I'm not giving the programmer any guarantees about symbols vs. characters vs. numbers etc. Instead I just use eql.
I think that this is a perfectly valid approach, and I would recommend it to others. eq is a waste of programmer time as far as I am concerned.
I think that's ok. The difference between EQL, EQUAL and EQUALP is more important.
Pascal
-- My website: http://p-cos.net Closer to MOP & ContextL: http://common-lisp.net/project/closer/ .
- References:
- Re: diff. betw. equal and eq on simbols
- From: Pascal Costanza
- Re: diff. betw. equal and eq on simbols
- From: Russell McManus
- Re: diff. betw. equal and eq on simbols
- Prev by Date: Re: Lisp security
- Next by Date: Re: Lisp security
- Previous by thread: Re: diff. betw. equal and eq on simbols
- Next by thread: Re: Lisp in embedded systems?
- Index(es):
Relevant Pages
|