... and I can always CHANGE-CLASS, can't I?
On Sun, Feb 7, 2021 at 9:46 AM Hans Hübner hans.huebner@gmail.com wrote:
Am So., 7. Feb. 2021 um 09:35 Uhr schrieb Manfred Bergmann < manfred.bergmann@me.com>:
Am 07.02.2021 um 09:23 schrieb Hans Hübner hans.huebner@gmail.com:
Am So., 7. Feb. 2021 um 09:20 Uhr schrieb Manfred Bergmann <
manfred.bergmann@me.com>:
But fundamentally, you also can’t create an instance of a class in
Common Lisp from just the symbol. The class definition must be known.
This simply is untrue. You can use FIND-CLASS to find a class named by
a symbol and then instantiate it.
Well, OK. Sure. But when I do that I have again a dependency on the concrete class, or? And it would be similar as knowing the class right from the start.
You don't. You have a dependency on the name of a class. The name could refer to two entirely different classes between invocations of FIND-CLASS. The name could also come from an external source. Thus, this is purely a run-time dependency and it would be quite possible that FIND-CLASS returns NIL if given a symbol that does not designate a currently-defined class.