Subject: Re: EQL specialization on methods in other packages
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 16 May 2004 22:55:51 -0500
Newsgroups: comp.lang.lisp
Message-ID: <cMmdnfiYC6laqjXdRVn-hQ@speakeasy.net>
Constantine Vetoshev  <see.my.signature@for.my.e-mail.address> wrote:
+---------------
| I'm trying to use EQL specialization to generic functions...
...
| (defmethod mt ((s (eql 'hello)))
|   (format t "hello~%"))
| 
| When running this code from within the MTEST package, everything works
| [and]  (MTEST:MT 'HELLO) prints "symbol". I suppose this happens
| because the HELLO in the method is interned within the MTEST package,
| and I'm passing in a HELLO interned in some other package...
+---------------

Exactly so.

+---------------
| Am I missing something obvious, or expecting unreasonable behavior?
| If the latter, then I probably do not understand the use of EQL
| specializers.
+---------------

Sure you do! It's symbols (and maybe packages) you're having
trouble with.  ;-}  ;-}

Try executing (MTEST:MT 'MTEST::HELLO) and see what you get,
then think about the results...


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607