Re: Snapshot/Release?

Marco Antoniotti <[email protected]> Wed, 15 Oct 2003 14:01:53 -0400
Newsgroups gmane.lisp.matlisp.user
Message-ID <[email protected]>
On Wednesday, Oct 15, 2003, at 13:39 America/New_York, Marco Antoniotti 
wrote:

>
> On Wednesday, Oct 15, 2003, at 02:56 America/New_York, Nicolas Neuss 
> wrote:
>
>> Marco Antoniotti <[email protected]> writes:
>>
>>>> Users, hear!
>>>> I vote for MREALPART.
>>>
>>> I vote for shadowing the symbols and use CL:REAL and CL:REALPART when
>>> needed.
>>>
>>> IMHO that is TRTTD.
>>>
>>> Cheers
>>
>> I do use none of CL:REAL, CL:REALPART or MATLISP:REAL.  The problem 
>> is that
>> my (and your) packages cannot use both COMMON-LISP and MATLISP without
>> taking care of this conflict.
>
> The conflict arises only when you :USE both CL and MATLISP.  That is, 
> AFAIU exactly what is supposed to happen.
>
> Again, IMHO you need to redesign your package carefully in order to 
> achieve the desired overloading effect.
>
> I'd go even further than that.  I think that M+, M* etc etc have no 
> business in being exported/defined the way they are.  MATLISP:+, 
> MATLISP:* etc etc are what you want.
>
> If you need a package with the characteristics you want you do
>
> (defpackage "FOO" (:use "MATLISP" "CL")
>    (:shadow "REALPART")
>    (:export "REALPART"))
>
> (in-package "FOO")
>
> (defmethod REAL ((x cl:complex)) (cl:realpart x))
>
> (defmethod REAL ((x matlisp:matrix)) (matlisp:realpart x))

That should have been

	(defmethod REALPART ((x cl:complex)) (cl:realpart x))

of course.

Marco
--
Marco Antoniotti
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.