[Openmcl-devel] a function to create a symbol in a given package
Robert Goldman
rpgoldman at sift.info
Wed Jun 3 13:56:45 PDT 2009
Taoufik Dachraoui wrote:
> Hi
>
> I tried but could not find a way to create a function that creates a
> symbol in a given package.
>
> I woud appreciate if someone can helpp me write the following function:
>
> (defun crate-symbol-in-package (symbol value package)
> .....)
>
> example of use:
>
> ? *package*
> COMMON-LISP-USER
> ? (create-symbol-in-package 'client 'me 'world)
> WORLD:CLIENT
> ? world::client
> 'ME
>
>
How about
(intern "CLIENT" :world)
(setf world::client 'me)
or, for that matter
(defvar world::client 'me)
what is it that you are trying to achieve here? This
create-symbol-in-package is so deeply unidiomatic, that I suspect if we
looked at what you are trying to do in context, we will find that it can
be achieved more easily in other ways.
For what purpose do you believe you need this function?
More information about the Openmcl-devel
mailing list