home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen
- From: sakkinen@jyu.fi (Markku Sakkinen)
- Subject: Re: member test?
- Message-ID: <1992Nov10.070124.5763@jyu.fi>
- Organization: University of Jyvaskyla, Finland
- References: <1992Nov6.081658.29693@bernina.ethz.ch> <EB.92Nov9085335@ascent.ascent.com>
- Date: Tue, 10 Nov 1992 07:01:24 GMT
- Lines: 26
-
- In article <EB.92Nov9085335@ascent.ascent.com> eb@ascent.com (Ed Barton) writes:
- >In article <1992Nov6.081658.29693@bernina.ethz.ch> haechler@bernina.ethz.ch (Stefan Haechler) writes:
- >
- > How can I know which dynamic type has a variable ?
- > ...
- > ...
- >The software-design answer is that you shouldn't have to know the
- >answer to this question, and that there may be something wrong with
- >the design if you need to ask it. If you know only that something is
- >a pointer-to-A, you should be using only the methods and virtual
- >functions that are part of the interface defined by class A.
- > ...
-
- Come on, there are many fully reasonable and legitimate situations
- in which one needs to know this. And C++ is almost the only OOPL
- I know of in which you cannot ask the dynamic type of an object.
-
- ----------------------------------------------------------------------
- Markku Sakkinen (sakkinen@jytko.jyu.fi)
- SAKKINEN@FINJYU.bitnet (alternative network address)
- Department of Computer Science and Information Systems
- University of Jyvaskyla (a's with umlauts)
- PL 35
- SF-40351 Jyvaskyla (umlauts again)
- Finland
- ----------------------------------------------------------------------
-