What does everyone think of this:
(defpackage :p
(:use :cl)
(:shadow . #=(cons car cdr))
(:export . #1#))
I.e. export exactly those symbols which are shadowed.
Kaz Kylheku wrote:
> What does everyone think of this:
>
> (defpackage :p
> (:use :cl)
> (:shadow . #=(cons car cdr))
> (:export . #1#))
>
> I.e. export exactly those symbols which are shadowed.
It's ok. As long as you don't feed EVAL with circular structures, it
should behave. (In any case, I'd shadow symbol names, instead of symbols
that would need to be interned in the current package first...).
--
__Pascal Bourguignon__
http://www.informatimago.com
>(defpackage :p
> (:use :cl)
> (:shadow . #=(cons car cdr))
> (:export . #1#))
Never used the syntax. Anyway, I think (:cons :car :cdr) or even
(#:cons #:car #:cdr) would be better.
Problem is that you might need to repeat that when you use-package :p
somewhere. It is described in detail here:
http://www.tfeb.org/lisp/hax.html#CONDUITS
And a solution is suggested, too.