Hacker News new | ask | show | jobs
by thelopa 1293 days ago
Most CL implementations don’t “track” the instances so much as have them point at a proxy for the real class object. When redefining a class, the old proxy object is marked as stale and then updated to point at the new class. This allows the runtime to lazily update instances to the new class (using the method you linked to) as they are encountered. As a result, you can have instances from several different class generations kicking around in memory.