Xref: utzoo comp.object:1568 comp.lang.c++:8887 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!texbell!uudell!chinacat!sequoia!memqa!r91400 From: r91400@memqa.uucp (Michael C. Grant) Newsgroups: comp.object,comp.lang.c++ Subject: Re: Choice of language for manufacturing Applications Message-ID: <5043@memqa.uucp> Date: 8 Aug 90 10:20:58 GMT References: <26686@pasteur.Berkeley.EDU> <56343@microsoft.UUCP> Organization: Memory R&QA, Motorola SPD Lines: 26 In article <26686@pasteur.Berkeley.EDU> lozinski@argon.UUCP (Chris Lozinski) writes: > > Technically this is caused by the default >structures of the objective-C language where the target class of a >message does not need to be known at compile time. In contrast the >default in C++ is that the target class does need to be known at >compile time. No, that is not necessarily true. If you define a 'base' or 'mother' class for all classes with common methods, then any program statement that needs to call that common method need not know the target class at all. As a simple example, I have a base class 'BaseObject' that I use a lot. Its only instance variable is 'NumRefs', which gives a count of how many lists the object is contained in (so I don't ~X it more than once!) But, it also contains a 'PrintOut' method which I then override in every other class I define. So, if I call I_Dont_Know_What_Class_This_Is->PrintOut(), it will work for any object use. This line of code could be in a procedure call that accept any BaseObject subclass. Defining a mother class like this could really help the organization of the program, anyway. Michael C. Grant