home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16018 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.5 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen
  3. From: sakkinen@jyu.fi (Markku Sakkinen)
  4. Subject: Re: member test?
  5. Message-ID: <1992Nov10.070124.5763@jyu.fi>
  6. Organization: University of Jyvaskyla, Finland
  7. References: <1992Nov6.081658.29693@bernina.ethz.ch> <EB.92Nov9085335@ascent.ascent.com>
  8. Date: Tue, 10 Nov 1992 07:01:24 GMT
  9. Lines: 26
  10.  
  11. In article <EB.92Nov9085335@ascent.ascent.com> eb@ascent.com (Ed Barton) writes:
  12. >In article <1992Nov6.081658.29693@bernina.ethz.ch> haechler@bernina.ethz.ch (Stefan Haechler) writes:
  13. >
  14. >   How can I know which dynamic type has a variable ?
  15. > ...
  16. > ...
  17. >The software-design answer is that you shouldn't have to know the
  18. >answer to this question, and that there may be something wrong with
  19. >the design if you need to ask it.  If you know only that something is
  20. >a pointer-to-A, you should be using only the methods and virtual
  21. >functions that are part of the interface defined by class A.
  22. > ...
  23.  
  24. Come on, there are many fully reasonable and legitimate situations
  25. in which one needs to know this.  And C++ is almost the only OOPL
  26. I know of in which you cannot ask the dynamic type of an object.
  27.  
  28. ----------------------------------------------------------------------
  29. Markku Sakkinen (sakkinen@jytko.jyu.fi)
  30.        SAKKINEN@FINJYU.bitnet (alternative network address)
  31. Department of Computer Science and Information Systems
  32. University of Jyvaskyla (a's with umlauts)
  33. PL 35
  34. SF-40351 Jyvaskyla (umlauts again)
  35. Finland
  36. ----------------------------------------------------------------------
  37.