home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / std / cplus / 2003 < prev    next >
Encoding:
Text File  |  1993-01-08  |  2.3 KB  |  46 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!titan!lpi!pkt
  3. From: pkt@lpi.liant.com (Scott Turner)
  4. Subject: Re: pointer comparisons
  5. Message-ID: <1993Jan8.150113.1643@lpi.liant.com>
  6. Sender: pkt@lpi (Scott Turner)
  7. Organization: Liant Software Corporation
  8. References: <1992Dec27.050118.1628@lpi.liant.com> <1992Dec30.184614.5551@microsoft.com> <1992Dec31.170223.21637@lpi.liant.com> <1993Jan1.155241.28217@ucc.su.OZ.AU> <9300300.29980@mulga.cs.mu.OZ.AU> <1993Jan4.200625.5680@lucid.com> <9300812.4038@mulga.cs.mu.OZ.AU>
  9. Date: Fri, 8 Jan 1993 15:01:13 GMT
  10. Lines: 34
  11.  
  12. In article <9300812.4038@mulga.cs.mu.OZ.AU>, fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
  13. > maxtal>    One consequence: abstract objects can exist.
  14. > maxtal>
  15. > maxtal>    Corollary: such objects have states not accessible via
  16. > maxtal>    the contiguous storage allocated for them.
  17. > maxtal>    (via virtual function calls)
  18. > To me, an abstract class is a class without any actual objects of that class,
  19. > so the idea of an "abstract object" seems to be an oxymoron. Similarly, the
  20. > idea that an object can have "state" that is not stored in its "storage" seems
  21. > to make a mockery of the whole idea of "storage".
  22.  
  23. Since John MAX Skaller was drawing inferences from my belief that base
  24. class subobjects are objects, I want to go on record.  I agree that
  25. "abstract objects" can exist, but the corollary does not follow.  
  26.  
  27. The easiest way to find an actual object of an abstract class is from
  28. the point of view of a constructor for an abstract class.  What's the
  29. type of the object pointed to by 'this'?  The type of that object is the
  30. abstract class, no question about it.
  31.  
  32. In the corollary, John MAX Skaller is referring to a different scenario
  33. in which the object of abstract class is a base class subobject of a
  34. fully-constructed enclosing object.  He concludes that the state of the 
  35. enclosing object is part of the state of the base class subobject.  The
  36. reasoning has something to do with the additional state being accessible via
  37. virtual function calls, but there's a big hole in it.  Virtual functions 
  38. (and non-virtual functions) can access any number of other objects,
  39. independent of the object for which they are called.
  40. --
  41. Prescott K. Turner, Jr.
  42. Liant Software Corp. (developers of LPI languages)
  43. 959 Concord St., Framingham, MA 01701 USA    (508) 872-8700
  44. UUCP: uunet!lpi!pkt                          Internet: pkt@lpi.liant.com
  45.