[Openmcl-devel] Package-local nicknames
didier at lrde.epita.fr
Wed Feb 6 09:42:54 CST 2013
Tim Bradshaw <tfb at tfeb.org> wrote:
> On 6 Feb 2013, at 14:25, Josh Marchán wrote:
>> A while back, I started playing with the idea on CCL and added it to 3b's
>> package-local-nicknames library. It's certainly not complete and it's an
>> awful hack, but it's a nice proof-of-concept:
> For what it's worth I think the right thing to add right now is not
> package-local-nicknames but a standard mechanism of hooking name->package
> lookup on which can be built anything you like. The traditional way of doing
> this is to redefine FIND-PACKAGE, but that does not work for all
> implementations (including CCL). If we could get everyone to agree that *any*
> name->package lookup checks (I am making this up as I go) *FIND-PACKAGE-HOOK*
> and if it is non-nil calls it with the name of the package, expecting two
> a package and T meaning use this
> nil and T meaning nothing found, and do not call the default function
> nil and nil meaning nothing found and call the default function.
> *FIND-PACKAGE-HOOK* should be bound to NIL during the call, so the hook can
> call FIND-PACKAGE without fear (which it will very often want to do).
> I have no idea what package *FIND-PACKAGE-HOOK* should be in.
> Once something like that exists then you can build any user-level thing you
> like on it.
It's a shame that this discussion occurs on the CCL mailing list,
without involving SBCL or any other compiler for that matter. May I
suggest that writing a CDR for this would be cool (and the discussion
can go on cdr-discuss). I just said so on sbcl-devel@ (in Cc:).
Resistance is futile. You will be jazzimilated.
Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com
More information about the Openmcl-devel