From: Marco A. <ma...@cs...> - 2003-10-15 17:39:54
|
On Wednesday, Oct 15, 2003, at 02:56 America/New_York, Nicolas Neuss wrote: > Marco Antoniotti <ma...@cs...> 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)) Cheers 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. |