I am trying to implement the basic object-oriented ANSI C runtime and use Objective-C as a guide.
It seems that they are three parts. Class description, class interface and class implementation. To create an instance of a class interface, the familiar method of using a class object to instantiate a single object can only occur if the runtime has already created the class object using the class description.
So, are all the class definitions statically assigned the first time that they are created to make it possible to instantiate using the Class object? Or, if they are distributed dynamically (on the first call), how? Is this part of the execution loop or is the class actually a function that determines if it was already allocated or not before the message was redirected?
c instantiation metaclass class objective-c-runtime
Anderson
source share