home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16035 < prev    next >
Encoding:
Text File  |  1992-11-10  |  2.0 KB  |  49 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: Quest: Multiple Virtual functions with same name
  5. Message-ID: <1992Nov10.101629.18067@jyu.fi>
  6. Organization: University of Jyvaskyla, Finland
  7. References: <1992Oct30.182516.20463@hplabsz.hpl.hp.com> <BxAwAK.I1B@fulcrum.co.uk> <rmartin.721096943@thor>
  8. Date: Tue, 10 Nov 1992 10:16:29 GMT
  9. Lines: 38
  10.  
  11. In article <rmartin.721096943@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  12. >rct@fulcrum.co.uk (Richard Taylor) writes:
  13. >
  14. >|In article <1992Oct30.182516.20463@hplabsz.hpl.hp.com> kalra@PROBLEM_WITH_INEWS_GATEWAY_FILE (Deven Kalra) writes:
  15. >|> ...
  16. >|>I get compiler warnings as:
  17. >|>
  18. >|>    render function hides base function
  19. >
  20. >This is to be expected, members in derived classes "hide" members in
  21. >base classes that have the same name.  See "ARM 13.1"
  22. >|> ...
  23. > ...
  24. >Because it is hidden.  The ARM justifies this with a reasonably
  25. >compelling argument.
  26. > ...
  27. >No, virtualness has nothing to do with it.  The functions would have
  28. >been hidden regardless of whether they were virtual or not.  In the
  29. >example, it would appear that the functions ought to be virtual.
  30. > ...
  31.  
  32. The explanation was good and exact.
  33. However, I don't find the rationale in the ARM convincing in the least.
  34. This hiding rule causes lots of trouble to the simple use of function
  35. overloading, in trying to prevent some potential (probably rare) bugs.
  36. It's all the more questionable because the general philosophy of C++
  37. indeed is not preoccupied with safety devices for bad or
  38. sloppy programmers.
  39.  
  40. ----------------------------------------------------------------------
  41. Markku Sakkinen (sakkinen@jytko.jyu.fi)
  42.        SAKKINEN@FINJYU.bitnet (alternative network address)
  43. Department of Computer Science and Information Systems
  44. University of Jyvaskyla (a's with umlauts)
  45. PL 35
  46. SF-40351 Jyvaskyla (umlauts again)
  47. Finland
  48. ----------------------------------------------------------------------
  49.