On 8 Aug 2005 at 21:05, Frank Heckenbach wrote:
Prof A Olowofoyeku (The African Chief) wrote:
[...]
I am more concerned about semantics, I am affraid that the presence/ absence of Root/TObject can be detected.
Quite possible. Also we should consider that Borland may change TObject in future versions. If we decide that we can, and want to, identify it with Root now, and later they change it so it's not compatible anymore, we'll have a problem.
We could do it this way, in the RTS ...
Type Root = Class OOE stuff ... end;
TObject = Class (Root) Delphi stuff ... end;
So if Borland change TObject, this needn't cause any incompatibility with Root. The question though is whether the fact that TObject then becomes a subclass of another object is problematic for Delphi compatibility ...
This is one question which perhaps you can judge better than us.
Well, if Root is inaccesible to programmers in the Delphi object mode (and it should, IMHO), then I would imagine that there shouldn't be a problem.
Of course, we must ensure that either Root or TObject becomes the implicit parent, depending on the mode.
Indeed.
The other question is if Root is in fact a proper ancestor of TObject (not by definition, of course, but perhaps by their features). Have you, or someone else, checked this?
AFAIK, in Delphi, TObject has no ancestor, either by definition or feature. It is an abstract object that is simply "TObject = Class". But then it also becomes the implicit ancestor of anything defined as "Class". Perhaps there is something circular or recursive going on here?
If so, this might be a good idea, as OOE is unlikely to change soon (and thus Root to add features), neither Delphi to drop existing features from TObject.
Precisely my thinking. The secret, as I see it, is to completely hide Root in Delphi mode. If this can be done, then I don't think it matters that TObject is a subclass of Root.
PS: I don't think there is any need to hide TObject in OOE mode, as long as it is not the implicit ancestor object in that mode. Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/