Do symbols need to be EQ?

Alessio Stalla alessiostalla at gmail.com
Fri Jul 3 13:10:22 UTC 2015


In general it is a n-to-1 relationship, n >= 0. A symbol has always a name
but it can have either no home package or one home package, and
additionally there can be any number of packages in which it is accessible.
You have to think three-dimensionally ;) yes, two symbols with the same
name in the same package are EQ. However, you can destructively alter
packages so as to replace a symbol with another with the same name *at a
later time*. Those won't be EQ, but a package will always contain at most
one symbol with a given name - at a given time.

On Fri, Jul 3, 2015 at 2:52 PM, Scott McKay <swmckay at gmail.com> wrote:

>
> On Fri, Jul 3, 2015 at 8:44 AM, Martin Simmons <martin at lispworks.com>
> wrote:
>
>> Packages are just a way to convert strings to symbols, which is useful
>> when
>> they are obtained from files outside a running CL (e.g. via the
>> reader/fasl
>> loader).
>>
>
> Agreed. Isn't it the case that {package x string} -> symbol is
> a 1-to-1 relationship? In which case, two symbols having the
> same name in the same package implies that the two symbols
> are in fact EQ?
>
> Sorry if I'm late to the party, I haven't been thinking about this
> for a few years.
>
> --S
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20150703/f20f5feb/attachment.html>


More information about the pro mailing list