Subject: Re: EQL specialization on methods in other packages
From: (Rob Warnock)
Date: Sun, 16 May 2004 22:55:51 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Constantine Vetoshev  <> 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 Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607