<div dir="ltr">Hi<div><br></div><div>Sorry but this will be my last message, I want to explain why I wanted to create this simple package system</div><div><br></div><div>basically the intention behind mb system is to behave exactly like the common lisp package with an exception</div>
<div><br></div><div>when we use (USE-PACKAGE P1) all external symbols of P1 will be imported into the current package</div><div>and if there is a conflict we have to unintern those already existing package</div><div><br></div>
<div>the idea behind mb is to save those symbols and restore them when we unuse P1, instead of losing them</div><div><br></div><div><br></div><div>example:</div><div><br></div><div><div>? *package*</div><div>#<Package "P1"></div>
<div>? (defun foo (x) (1+ x))</div><div>FOO</div><div>? (in-package :p2)</div><div>#<Package "P2"></div><div>? (defun foo (x) (+ x 2))<br></div><div>FOO</div><div>? (export 'foo)</div><div>T</div><div>
? (in-package :p1)</div><div>#<Package "P1"></div><div>? (foo 3)</div><div>4</div><div>? (use-package :p2)</div><div>Invoking restart: UNINTERN all conflicting symbols from #<Package "P1"></div>
<div>T</div><div>? (foo 3)</div><div>5</div><div>? (unuse-package :p2)</div><div>T</div><div>? (foo 3)</div><div>Invoking restart: Return to toplevel.</div></div><div><br></div><div><br></div><div>To solve this situation i created mb such that when you unuse p2 the p1::foo is restored</div>
<div><br></div><div><div>? (in-package :p1)</div><div>? (defun foo (x) (1+ x))</div><div>FOO</div><div>? (foo 3)</div><div>4</div><div>? (use :p2)</div><div>NIL</div><div>? (foo 3)</div><div>5</div><div>? (unuse :p2)</div>
<div>NIL</div><div>? (foo 3)</div><div>4</div></div><div><br></div><div><br></div><div>I apologize if I annoyed some people on this board</div><div><br></div><div>Kind regards</div><div><br></div><div><br></div><div><br></div>
<div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 10:12 PM, R. Matthew Emerson <span dir="ltr"><<a href="mailto:rme@clozure.com" target="_blank">rme@clozure.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I appreciate that the discussion of this with-package macro and associated issues may be generally interesting to a number of people, but it seems to me that the discussion is not about CCL in particular, but is instead really about Common Lisp generally.<br>
<br>
That being so, would it be too much to ask the participants to consider moving further discussion of this topic to private mail or some other place?<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Openmcl-devel mailing list<br>
<a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br>
<a href="http://clozure.com/mailman/listinfo/openmcl-devel" target="_blank">http://clozure.com/mailman/listinfo/openmcl-devel</a><br>
</div></div></blockquote></div><br></div>