On Thu, Dec 15, 2011 at 2:55 PM, Paul Khuong <pvk@...> wrote:
> They are surprisingly easy to hack into a working prototype:
See https://github.com/3b/package-local-nicknames for the (sbcl only)
prototype/hack I've been using.
> * (defpackage "FOO"
> (:use "CL")
> (:local-nicknames "X" "SB-EXT"))
I used (:local-nickname (#:nickname #:real-name) ...), in hopes of
making it more readable when multiple local nicknames were defined.
> The diff is tiny: each package comes with a (string=) alist of local nickname to global name, and read-token looks up in that plist when a package designator is tokenized.
I did the lookup in FIND-PACKAGE, which possibly makes it a bit more
intrusive than just modifying the reader (if I'm understanding
correctly that your prototype works that way).
> Please discuss (:
contains most of the notes I took after discussing it with people on
#sbcl and researching the alternatives a bit.