[armedbear-devel] Package-local nicknames landed

Rudolf Schlatte rudi at constantly.at
Fri Mar 1 11:30:56 UTC 2013


Hi,

I just committed support for package-local nicknames in abcl.  This follows the lead of sbcl and lets you introduce short, meaningful nicknames ("XML" for "COM.WHATEVER.FOO.XML-PARSER") in your own packages without fear of package (nick)name collisions.

Here's the example from Nikodemus' documentation:

(defpackage :bar (:intern "X"))
(defpackage :foo (:intern "X"))
(defpackage :quux (:use :cl) (:local-nicknames (:bar :foo) (:foo :bar)))
(find-symbol "X" :foo) ; => FOO::X
(find-symbol "X" :bar) ; => BAR::X
(let ((*package* (find-package :quux)))
  (find-symbol "X" :foo))               ; => BAR::X
(let ((*package* (find-package :quux)))
  (find-symbol "X" :bar))               ; => FOO::X

This puts :package-local-nicknames on *features*; I had to increase the fasl version since %defpackage got a new parameter.

Cheers,

Rudi





More information about the armedbear-devel mailing list