Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!pdn!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: asking an object for its type Message-ID: <27D572F6.2A70@tct.uucp> Date: 6 Mar 91 22:53:42 GMT References: <70902@microsoft.UUCP> <6900@mace.cc.purdue.edu> <71034@microsoft.UUCP> Organization: Teltronics/TCT, Sarasota, FL Lines: 14 According to jimad@microsoft.UUCP (Jim ADCOCK): >...what is really needed is neither the ability to test whether an >object supports some particular method, nor the ability to test whether >an object is some exact type, but rather, what is needed is the ability >to test whether an object supports some particular protocol. Even that isn't enough. Two unrelated types can both implement "void foo(int)". That doesn't mean that the two foos are equivalent. The "isKindOf" test is the minimum for reasonable dynamic typing in the C++ type forest. -- Chip Salzenberg at Teltronics/TCT , "All this is conjecture of course, since I *only* post in the nude. Nothing comes between me and my t.b. Nothing." -- Bill Coderre