------- Comment #4 from nicola at gcc dot gnu dot org  2010-09-17 09:28 -------
This proposed enhancement seems to be a major change to the language! :-)

It basically would mean that every object has a customized class hierarchy.

So, when a message is sent to the object, the object's custom class hierarchy
would need to be traversed - instead of the standard one.  (that would indeed
complicate messaging quite a lot)

When an instance variable of the object is accessed, again the object's custom
ivar list would need to be examined to determine the offset of that specific
ivar ... instead of using a standard ivar/offset information for all objects. 
(again this would indeed complicate instance variables quite a lot).

I suppose my point is that this object-dependent class hierarchy is not just an
"enhancement" - it is so radical that it would basically transform Objective-C
into another language (it's a nice idea though!). ;-)

The simpler version of all of this is to be able to replace a class with
another one.  So, you'd replace 'myRootObject' with 'myDebuggingRootObject' and
that would happen everywhere in your application for all the objects.  This is
called 'poseAs:'.  It is clearly much easier to implement than custom
replacement of classes for a single object, but it is still quite hard.  So
hard tha Apple removed it from their runtime and deprecated it.  It's no longer
available there and probably will be removed from the GNU runtime too.  Anyway,
if you're interested in this dynamic modifications of class hierarchies, you
may want to look into up (and maybe open up a new issue on that).

I'd like to close this issue just because the enhancement proposed is too
radical. ;-)



nicola at gcc dot gnu dot org changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
           Priority|P2                          |P4
         Resolution|                            |WONTFIX


Reply via email to