[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in intern-function-name (low.l)
- To: Gregor.pa@Xerox.COM
- Subject: Re: Bug in intern-function-name (low.l)
- From: kempf@Sun.COM
- Date: Mon, 27 Jun 88 09:07:51 -0700
- Cc: kempf@Sun.COM, David Vinayak Wallace <Gumby@MCC.COM>, commonloops.pa@Xerox.COM
- In-reply-to: Your message of Sat, 25 Jun 88 14:55:00 -0700. <19880625215557.6.GREGOR@PORTNOY.parc.xerox.com>
- Redistributed: commonloops.pa
> This function uses ~S to generate function names instead of ~A. Thus, if
> the interning is being done in another package, the package qualification
> will be inserted into the name and a different name will be generated.
> Below, it is correctly defined.
>Actually, I think the function is correctly defined as it stands. In
>the code fragment concerned, it is trying to generate a symbol whose
>name looks like the printed representation of a list. I wanted any
>package qualification that might appear in the printed representation to
>appear in that list.
The problem comes when the function is used to generate method function
names for purposes of identifying methods in environment tools. Since
real function specs have not yet been approved much less implemented,
the only portable alternative is to use symbols, as PCL does. However, if a
method spec is computed in list form during some environmental operation
(for example, source code finding using the generic function name) and
INTERN-FUNCTION-NAME is called to generate a symbol identifying the
method function, the ~S format will cause the symbols in the method
spec to be prefixed with the package symbol unless FORMAT
happens to be called in the package in which the original symbols in
the spec were interned. The result is a symbol name which is not EQUALP to the
original, since the original method function spec is formatted in the
package where the generic function (and thus the method) was defined.
Another alternative, mentioned by Dave Wallace, would be to use SYMBOL-NAME,
in which case the package in which the formatting was occuring does not
If package qualification within the list is desired, then it should
probably be generated explicitly by INTERN-FUNCTION-NAME. This will cause the
package name to always appear in the symbol, regardless of what the
current state of the user's environment happens to be.