This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Gensymed Package?

3 posts · 729 views

This is just a curiousity ;)
Is it possible to make a package which you can only access by having the actual gensym symbol?

Something like:
(setf *var* (gensym))
(make-package *var* :use '(:cl))

accept this doesn't work, because you can still access the package by the string name of the gensymed variable.

Re: Gensymed Package?

A package name is a string, as specified by 11.1.1.1. You can even use literal string as an argument to defpackage/make-package (or even a character). When you use a symbol it is used just for its name, it doesn't matter what the symbol actually is.

Re: Gensymed Package?

Thats what i suspected. Oh well, its still simple to create unique package names :)