Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!pdn!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.std.c++ Subject: Re: type/member tags (was Re: asking an object for its type) Message-ID: <27CD159D.6581@tct.uucp> Date: 28 Feb 91 14:37:17 GMT References: <27C95D3A.1715@tct.uucp> <1991Feb27.154311.782@csc.ti.com> Organization: Teltronics/TCT, Sarasota, FL Lines: 19 According to peterson@choctaw.csc.ti.com (Bob Peterson): >In article <27C95D3A.1715@tct.uucp> chip@tct.uucp (Chip Salzenberg) writes: >>Presumably, a well-designed class hierarchy will use a virtual >>function to store objects ... > >Researchers and vendors have taken a number of implementation approaches >... The details of the various implementations vary widely, but few depend >on virtual functions to supply type information. Is there any reason to avoid virtual functions for object storage? I had not envisioned a virtual function to return type information, but rather a virtual function to actually _do_the_work_, so no one outside of that function need know the actual type of the object stored. -- Chip Salzenberg at Teltronics/TCT , "It's not a security hole, it's a SECURITY ABYSS." -- Christoph Splittgerber (with reference to the upage bug in Interactive UNIX and Everex ESIX)