From: ········@gte.net
Subject: Operator Overloading...???
Date: 
Message-ID: <6ctvmq$kp7$1@gte2.gte.net>
Can I overload operators in Lisp/CLOS?  +.-,/,= etc.?
Please copy the reply post to my email listed below also.

Thanks,

Sam Griffith Jr.
·········@aol.com

From: Barry Margolin
Subject: Re: Operator Overloading...???
Date: 
Message-ID: <1ADI.10$8E2.320960@cam-news-reader1.bbnplanet.com>
In article <············@gte2.gte.net>,  <········@gte.net> wrote:
>Can I overload operators in Lisp/CLOS?  +.-,/,= etc.?

No.  Only CLOS generic functions can be specialized, and very few of CL's
built-in functions are generic functions.  Some functions that allow users
to extend them are PRINT (you can define a PRINT-OBJECT method for your
class) and DESCRIBE.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
Support the anti-spam movement; see <http://www.cauce.org/>
Please don't send technical questions directly to me, post them to newsgroups.
From: Mike Mcdonald
Subject: Re: Operator Overloading...???
Date: 
Message-ID: <6d1vmp$29n@hpmos.wv.mentorg.com>
In article <··················@cam-news-reader1.bbnplanet.com>,
	Barry Margolin <······@bbnplanet.com> writes:
> In article <············@gte2.gte.net>,  <········@gte.net> wrote:
>>Can I overload operators in Lisp/CLOS?  +.-,/,= etc.?
> 
> No.  Only CLOS generic functions can be specialized, and very few of CL's
> built-in functions are generic functions.  Some functions that allow users
> to extend them are PRINT (you can define a PRINT-OBJECT method for your
> class) and DESCRIBE.
> 

  In one since, that's strickly true but one can
achieve the same thing by shadowing the existing
symbols and creating generic versions (with the default
one calling the shadowed function). It'll give you the
same effect with a little work. Rich Zipple used to do
this with his symbolic math packages all of the time.

  Mike McDonald
  ·······@mikemac.com