Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!asylum!m5!tma From: tma@m5.COM (Tim Atkins) Newsgroups: comp.object Subject: Re: Shouldn't debuggers be able to debug dynamic objects? Message-ID: <4578@m5.COM> Date: 27 Feb 91 17:52:10 GMT References: <1991Jan24.152256.24273@resam.dk> <1991Jan25.145947.16431@bellcore.bellcore.com> <1991Jan28.100213.1822@resam.dk> <1991Jan28.151241.25449@bellcore.bellcore.com> <40541@genrad.UUCP> Reply-To: tma@m5.UUCP (Tim Atkins) Distribution: comp Organization: Object Sciences Corp., Menlo Park, CA Lines: 39 In article <40541@genrad.UUCP> mas@crom.genrad.COM (Mark A. Swanson) writes: >Determining what a dynamic object is is not always possible in raw C++. >However, if one is developing within a development environment with a standard >set of object coding conventions (e.g. a required char *myclass() method) >an integrated debugger can use them to provide such functionality. > >Such a layered approach is practical now and avoids having to wait years >for invention and agreement on how best to support meta-identities without >adding to C++'s minimal object overhead. I fail to understand the phrase "minimal object overhead" regarding C++. Surely such can not be claimed in terms of space. If one cares about issues of polymorphism for a given set of classes then each instance will contain an overhead of at least a 4 byte virtual table pointer for every class in its inheritance hierarchy than defines virtual functions. In comparison, languages that only include a single pointer to the object's class where information allowing message binding is to be found are much more minimal in terms of space overhead. Nor is this the complete story on C++ space overhead. Due to the way MI is implemented in relation to the implementation requirement that all superclass variables be contiquous, it is quite possible that there is duplication of entire substructures in the C++ instance. I understand that the goal of these implementation practices is greater run-time efficiency, but certainly no one should claim they came without price nor that C++ acheives "minimal object overhead". I also have considerable problem with C++ in that given an instance one cannot know its class at run-time. In my view this means that the object is in some sense not truly first class and posseses only a partial identity. Among other problems this totally blows away encapsulation in that the behavior of the object and indeed any metalevel information is known only to the compiler. Even within cfront this information is never explicitly present from what I have seen. C++ instances are really only data structures with most of their knowledge not present at all within running programs. They are not objects in the sense that they have knowledge present within themselves (or their class) of their own structure or behavior. They literally do not know what they are. - Tim