There is a reason why I stated quite clearly that what DIKU/Merc (being the code in question) uses is somewhere between a prototype and a factory. Then later expanded on what exactly both of these design patterns really are. Which btw, also answers why someone may need a "meta" class. I also explained that obj_index_data performs other roles than simply object instantiation. It also provides a single point of access to centralized data.
What I don't understand is... why do you feel the need to repeat exactly what you've said in post #6?
Runter said:It's already been made clear by 4 or 5 different people what the prototype code is. I'm pointing out there are other options--and you can still write some function to transfer fields. Yes, diku does a lot of things a certain way. That doesn't discount other options.
Runter said:Just thought I would point out It would have also been fairly easy to simply use obj_data for both prototypes and instantiated objects from those prototypes. Depending on how your own personal implementation it could mean having useless fields in both but not necessarily. I think someone, like David pointed out, wanted a metaclass. And it made sense to create a physical separation of (meta)class from instance.
|