Subject: bug#27016: possible bug in `defsetf'

From: Rafael D Sorkin <[email-masked]>
Date: Thu, 25 May 2017 00:59:08 -0400

> > I had a defsetf inside a conditional in a file that was to be
 > > loaded and/or compiled and then loaded.  (Compilation isn't
 > > really the issue.)  Before loading that file I set a "switch"
 > > which the conditional referred to.  That way a defsetf done
 > > before loading the file could be either overridden or not, as
 > > desired.
 > 
 > Can't you just `defsetf' unconditionally to a named function,
 > and change that function's definition when appropriate (in a
 > conditional)?
 > 
 > 
 > Michael.

Thanks for the suggestion, Michael.  I think it would work, but
the function I'm aliasing to is `symbol-value', and I would feel
slightly uncomfortable to insert an intermediate function which
would have to either call `symbol-value' or be redefined to be
it.  Fortunately, I hadn't used defsetf inside a conditional
more than a couple of times, and for those it was easy to devise
adequate workarounds (once I understood what the problem was).

For the future, I have resolved to use `defsetf' only at top
level.

- Rafael

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 Rafael Sorkin
 Perimeter Institute for Theoretical Physics
 31 Caroline Street North
 Waterloo, ON  N2L 2Y5
 Canada
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-