Re: diff. betw. equal and eq on simbols



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/
.



Relevant Pages

  • Re: diff. betw. equal and eq on simbols
    ... >> If you use EQ you tell readers of your program that you don't expect ... If you use EQL you tell ... > I almost never use eq, and therefore I'm not giving the programmer any ... > guarantees about symbols vs. characters vs. numbers etc. ...
    (comp.lang.lisp)
  • Re: What counts as literary.
    ... Writers who want to set their readers intellectual puzzles, ... motivation stinks, because they're not characters, they're allegories. ... The difference between an allegory and a parable is that an allegory is long and systematic, whereas a parable is short and normally makes one and only one point. ... Most decent SF writers will eventually come up with a few, usually conflicted demi-villains. ...
    (rec.arts.sf.composition)
  • Re: Harry Potter
    ... run things out so long in real time and still have to keep your ... you let the characters and the ideas evolve over something like ... The publisher doesn't want to have to crank up some ... And that's aside from the problem of readers of book III not being ...
    (rec.arts.sf.composition)
  • Re: What counts as literary.
    ... motivation stinks, because they're not characters, they're allegories. ... Your use of 'allegory' might not be my use of 'allegory.' ... These are the books readers ...
    (rec.arts.sf.composition)
  • Re: The Opposite of Starting Fresh
    ... readers approach and experience stories set in a shared ... using characters and locales his father ... learn more about the history of Atlantis. ...
    (rec.arts.comics.dc.universe)