Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Specialized equal
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kent M Pitman  
View profile  
 More options Nov 15 2001, 12:20 pm
Newsgroups: comp.lang.lisp
From: Kent M Pitman <pit...@world.std.com>
Date: Thu, 15 Nov 2001 17:16:07 GMT
Local: Thurs, Nov 15 2001 12:16 pm
Subject: Re: Specialized equal

Barry Margolin <bar...@genuity.net> writes:
> In article <m3r8r0dm01....@europa.pienet>,
> Greg Menke  <gregm-n...@mindspring.com> wrote:
> >Is the right solution to use 'myclass-equalp` kinds of functions or is
> >there a CLOS-aware variation of the eq* suite of functions I could
> >use instead?  A fairly close search of CLHS didn't show anything, but
> >I could've easily missed it.

> You should use your own function.  Equality isn't something that's
> type-dependent, it's application-dependent.

I think of it as multi-dimensional.  There is no such generic concept as
equality.  There is equality-for-a-purpose, and there are many purposes.

It is unfortunate that the functions eq, eql, equal, equalp appear
(probably falsely) to be all of a kind, arranged along a certain
one-dimensional space of generality of equality.  In fact, equality is
a complex multi-dimensional space with very different shape depending
on the purpose.  For example, equal-as-expression-structure,
equal-as-lisp-semantic-expressions, equal-as-fortran-semantic-expressions,
equal-as-paperweight, equal-as-cook, equal-as-typist, equal-as-friend,
even if all generic, are not linearly arranged.  And they may be BOTH
type-dependent AND as each a different "application" of equality (to use
Barry's term) also application-dependent.

Some of this is just so much abstract philosophy, but the concrete
importance is: It is, to many, a letdown not to be able to customize
EQUAL because everyone likes to think themselves and their
application-of-the-day as the center of the universe.  Programmers
must not get into a turf war trying to redefine the meaning of the one
and only one EQUAL because there is not one and only one single
meaning of equality.  And the attempt to shoehorn things into one
function is what causes this.

I took the controversial position of asking that EQUAL not be included in
the language because of the confusions it evokes.  Doubtless most people
are just as happy I lost this argument because there is something handy
about the vague bluntness of EQUAL and EQUALP.  And maybe it's just as well
these names are taken by something not very general because it means that
the name isn't empty-and-waiting-to-be-pounced-upon.  But don't confuse
the notion of a "blunt" EQUAL with the notion of a "general purpose" EQUAL.
Hammers are useful for a great many household needs, too, but not all of
them are good style that you would build layered product upon...  Production
techniques, to be of refined and reliable quality, often have to develop
their own "hammer-substitutes", that is, their own more-appropriate tools.

> Kent has a white paper on the whole issue of copying and equality, and I'm
> sure he'll chime in with the URL.

http://world.std.com/~pitman/PS/EQUAL.lisp

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.