Apropos packages, I've made a start adding the standard CL packages to
Namespace's nsTable. However, this doesn't seem very clean because
when it comes to handling the :use stuff, I need to use the method
LispPackage#use(LispPackage, LispPackage). This is commented out in
trunk, but I'm using it now (with a few minor changes).
Consider processing (make-package "COMMON-LISP-USER" :nicknames
'("CL-USER") :use '("COMMON-LISP")). COMMON-LISP is already in the
namespace (new addition), along with KEYWORD, so to process this form
seems conceptually straightforward:
Namespace commonlisp_user = valueOf("COMMON-LISP-USER") ; works fine,
add a new namespace is nsTable
Namespace commonlisp = valueOf("COMMON-LISP") ; works fine, get the
Namespace for COMMON-LISP which already exists
for each nickname, nsTable.put(nickname, commonlisp_user) ; works
fine!
for each use
LispPackage#use(commonlisp_user, use) ; !! #use wants LispPackages,
not Namespaces!
Unless I'm being spectacularly dumb with Java this evening, it seems
like I need a new hash table and associated valueOf method in
LispPackage to accommodate this sort of case. I have a horrible
feeling I'm overlooking something trivial, but I've spent too long
already thinking what the best approach is that I thought it best to
ask!