[Openmcl-devel] with-package

Taoufik Dachraoui dachraoui.taoufik at gmail.com
Sat Jan 12 07:46:29 PST 2013


Here an example that may be found show how this package system may be
useful and easy to use

? (use calculus)
NIL
? (defun foo (x) (share x))
FOO
? (unuse calculus)
NIL
? (foo 3)
.3 boxes:(NIL)
.r:3
3
? (share 3)
Invoking restart: Return to toplevel.

Taoufik


On Sat, Jan 12, 2013 at 4:06 PM, Robert P. Goldman <rpgoldman at sift.info>wrote:

> I would really discourage you from doing this, even if you can get it to
> work. Stuffing symbols into a package and then ripping them back out on the
> fly is pretty crude surgery. It makes the correctness of your code depend
> on arbitrary context. ("When I call this, will it cause a symbol clash
> error?").
>
> Am I correct in thinking that all you want to do is save some typing? If
> so, a macro that lets you access symbols without explicitly specifying the
> package, but doesn't have these gross side effects, is probably to be
> preferred.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130112/d8e2bc56/attachment.htm>


More information about the Openmcl-devel mailing list