home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19815 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  4.1 KB

  1. Xref: sparky comp.lang.c++:19815 comp.object:5031
  2. Newsgroups: comp.lang.c++,comp.object
  3. Path: sparky!uunet!mcsun!chsun!bernina!neptune!santas
  4. From: santas@inf.ethz.ch (Philip Santas)
  5. Subject: Re: Pros and cons of C++
  6. Message-ID: <1993Jan23.225402.1897@neptune.inf.ethz.ch>
  7. Sender: news@neptune.inf.ethz.ch (Mr News)
  8. Nntp-Posting-Host: ru2.inf.ethz.ch
  9. Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
  10. References: <1993Jan21.231618.8962@midway.uchicago.edu> <1993Jan22.142518.22644@neptune.inf.ethz.ch> <1993Jan22.155414.11675@midway.uchicago.edu>
  11. Date: Sat, 23 Jan 1993 22:54:02 GMT
  12. Lines: 71
  13.  
  14. In article <1993Jan22.155414.11675@midway.uchicago.edu> dave@alex.uchicago.edu (Dave Griffith) writes:
  15. > santas@inf.ethz.ch (Philip Santas) writes:
  16. >> dave@alex.uchicago.edu (Dave Griffith) writes:
  17. >>>
  18. >>>Nonsense.  In traditional subclassing, there is no concept of coercing to
  19. >>>the superclass at all.  Coercions, if they occur, are utterly orthogonal to
  20. >>>the subclassing heirarchy.  C++ implements this _very_ poorly (truncating
  21. >>>objects if passed by value!) but calling this traditional inheritance is
  22. >>>just wrong.
  23. >>
  24. >>I hope you are familiar with the terms "reference semantics" and "value semantics".
  25. >>Coercions do occur when you move the object to the superclass in "value semantics".
  26. >>Furthermore, you definitely coerce an object when you move it to the superclass,
  27. >>since you alter its behaviour. If you don't believe me, make equality tests
  28. >>on objects of differnt classes (which are at the same inheritance path).
  29. >
  30. >You're stuck in C++ here.  This is not the case in many other OO languages,
  31. >and in only makes sense in C++ because of it's C roots showing through.  In
  32. >Smalltalk and Eiffel, everything you describe would be just overly baroque 
  33. >nonsense.
  34.  
  35. Smalltalk and Eiffel are not the only OOLs.
  36. In Oberon for instance, this coercion is called ``projection''(as far as I remember).
  37.  
  38. Since you mentioned Smalltalk, if you send the message ``super'' to an object,
  39. you change its behaviour, by calling the method from the superclass.
  40.  
  41. So much about "baroque nonsense"...
  42.  
  43. >A formal definition of Ada without concurrency took over six man years to
  44. >produce (NYU, if I remember correctly).  Ada without concurrency is a 
  45. >much simpler language than C++. Fewer types, fewer control primitives,
  46. >less dynamism, less overriding. 
  47.  
  48. Ada does not have Inheritrance as OOLs have. The fact you mention, is _irrelevant_
  49. to our case.
  50.  
  51. > As such, a decade seemed a reasonable
  52. >time frame for a formal C++ defn.  You indicated that such a defn. would
  53. >be the only argument you would accept. and I declined. 
  54.  
  55. You initially said that overloading of "=" (ie. coercions, constructors) in C++
  56. increases the complexity. You did not document this.
  57.  
  58. I said that subclassing increases the complexity in the _same_ way, 
  59. and coecrions do not increase it any further, since you
  60. can view them as subclassing, or better, you can view subclassing as coercions:
  61. you remove fields when you go to the superclass, or you use the identity function,
  62. or you remove and/or redefine methods; all these are coercions.
  63.  
  64. In other terms, this is a problem for all the OOLs which support inheritance,
  65. and not just of C++ as you originally stated.
  66.  
  67. You insisted that this is not the case. I have proved _my_ part. If you want
  68. to refute my statements, _you_ have to bring valid arguments, or any valid proof for your
  69. statements. Any other undocumented statement from your side (no matter in how _offencive_ way
  70. you dress it) is pompous fairy-tail. Period.
  71.  
  72. Philip Santas
  73.  
  74.    "the bogosity in a field equals the bogosity imported from related areas, 
  75.                   plus the bogosity generated internally,
  76.     minus the bogosity expelled or otherwise disposed of."  - K. E. Drexler
  77. --------------------------------------------------------------------------------
  78. email: santas@inf.ethz.ch                                Philip Santas
  79. Mail: Dept. Informatik                     Institute of Scientific Computation
  80.       ETH Zurich                          Swiss Federal Institute of Technology
  81.       CH-8092 Zurich                                  Zurich, Switzerland
  82.       Switzerland
  83. Phone: +41-1-2547478
  84.  
  85.